# 我可以将主题只对特定用户组开放吗？

**URL:** https://meta.discourse.org/t/can-i-make-a-theme-available-to-specific-user-groups-only/362653
**Category:** Development
**Tags:** horizon-theme
**Created:** [2025年四月20日 01:53 UTC](https://meta.discourse.org/t/can-i-make-a-theme-available-to-specific-user-groups-only/362653 "2025-04-20T01:53:12Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [2025年四月20日 01:58 UTC](https://meta.discourse.org/t/can-i-make-a-theme-available-to-specific-user-groups-only/362653/3 "2025-04-20T01:58:56Z")

</div>

除非进行插件开发，否则不行

> [@Restrict themes to certain groups?](https://meta.discourse.org/t/restrict-themes-to-certain-groups/87868/6?u=lilly):
>
> 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](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](https://github.com/discourse/discourse/blob/661d89f489eb0cfcde4f02d0a0a971536209a62c/app/controllers/application_controller.rb#L322-L351) As Sam said, what you want to do is possible,…

---

_[View the full topic](https://meta.discourse.org/t/can-i-make-a-theme-available-to-specific-user-groups-only/362653)._
