# Restrict themes to certain groups?

**URL:** https://meta.discourse.org/t/restrict-themes-to-certain-groups/87868
**Category:** Support
**Created:** [5월 19, 2018, 2:22오전 UTC](https://meta.discourse.org/t/restrict-themes-to-certain-groups/87868 "2018-05-19T02:22:11Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Flower\_Child](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/flower_child/32/94987_2.png) [@Flower\_Child](https://meta.discourse.org/u/Flower_Child)
#### Post date: [5월 19, 2018, 2:22오전 UTC](https://meta.discourse.org/t/restrict-themes-to-certain-groups/87868/1 "2018-05-19T02:22:11Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [5월 20, 2018, 9:16오후 UTC](https://meta.discourse.org/t/restrict-themes-to-certain-groups/87868/2 "2018-05-20T21:16:17Z")

</div>

That isn’t currently possible, no.

---

<div class="post-metadata">

### Author: ![John123](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@John123](https://meta.discourse.org/u/John123)
#### Post date: [5월 20, 2018, 9:36오후 UTC](https://meta.discourse.org/t/restrict-themes-to-certain-groups/87868/3 "2018-05-20T21:36:54Z")

</div>

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

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [5월 21, 2018, 12:37오전 UTC](https://meta.discourse.org/t/restrict-themes-to-certain-groups/87868/4 "2018-05-21T00:37:10Z")

</div>

> [@John123](#):
>
> I wonder if there is a way to develop such a plug-in independently.

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

---

<div class="post-metadata">

### Author: ![Flower\_Child](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/flower_child/32/94987_2.png) [@Flower\_Child](https://meta.discourse.org/u/Flower_Child)
#### Post date: [5월 22, 2018, 12:04오전 UTC](https://meta.discourse.org/t/restrict-themes-to-certain-groups/87868/5 "2018-05-22T00:04:33Z")

</div>

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

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [5월 22, 2018, 12:11오전 UTC](https://meta.discourse.org/t/restrict-themes-to-certain-groups/87868/6 "2018-05-22T00:11:31Z")

</div>

As a starting point, you could have a look at how theme access is overridden for the [theme-creator.discourse.org](http://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

---

<div class="post-metadata">

### Author: ![WaitroseCarpark](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/waitrosecarpark/32/198599_2.png) [@WaitroseCarpark](https://meta.discourse.org/u/WaitroseCarpark)
#### Post date: [5월 14, 2019, 8:56오전 UTC](https://meta.discourse.org/t/restrict-themes-to-certain-groups/87868/7 "2019-05-14T08:56:43Z")

</div>

I kind of did this and tied it to Patreon tiers

> [@Show/hide themes for specific groups?](https://meta.discourse.org/t/show-hide-themes-for-specific-groups/115459):
>
> I’d like to offer a patreon tier that allows users access to particular themes. Is there any way of showing/hiding themes from particular groups?

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [9월 19, 2022, 8:11오후 UTC](https://meta.discourse.org/t/restrict-themes-to-certain-groups/87868/8 "2022-09-19T20:11:38Z")

</div>



---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [9월 20, 2022, 9:22오전 UTC](https://meta.discourse.org/t/restrict-themes-to-certain-groups/87868/9 "2022-09-20T09:22:45Z")

</div>


