Restrict themes to certain groups?

I’d like a way to restrict themes to particular groups - for example, I’m hoping to give the donators group access to certain exclusive themes and ones that aren’t ready to be released publicly. There any way to do this?

2 Likes

That isn’t currently possible, no.

2 Likes

That would be a great feature, I wonder if there is a way to develop such a plug-in independently. Also if there were a way to label tags that come from different types of users (or at least differentiate between admin and members. What do you think about that?:grinning

It could be done in a plugin, it is rather tricky, but doable.

would definitely be useful. got any pointers on how a plugin could work?

As a starting point, you could have a look at how theme access is overridden for the theme-creator.discourse.org system:

https://github.com/discourse/discourse-theme-creator/blob/933a72c6f0f2a69647e85aa0dd3035a80d46d8f6/plugin.rb#L20-L28

The allow_theme? method is used in Discourse’s application controller here:

https://github.com/discourse/discourse/blob/661d89f489eb0cfcde4f02d0a0a971536209a62c/app/controllers/application_controller.rb#L322-L351

As Sam said, what you want to do is possible, but it will require a fair amount of development work to get it working smoothly

10 Likes

I kind of did this and tied it to Patreon tiers