# Category Restrictor plugin

**URL:** https://meta.discourse.org/t/category-restrictor-plugin/324765
**Category:** Plugin
**Created:** [September 3, 2024, 8:19pm UTC](https://meta.discourse.org/t/category-restrictor-plugin/324765 "2024-09-03T20:19:44Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [September 3, 2024, 8:19pm UTC](https://meta.discourse.org/t/category-restrictor-plugin/324765/1 "2024-09-03T20:19:44Z")

</div>

# Discourse Category Restrictor

| | | |
| --- | --- | --- |
| ℹ | **Summary** | Allows staff and category moderators to silence users in specific categories |
| 🛠 | **Repository Link** | [https://github.com/communiteq/discourse-category-restrictor](https://github.com/communiteq/discourse-category-restrictor) |
| 📖 | **Install Guide** | [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157) |
| 💰 | **Sponsored by** | @Gotchur |

### Features

Allows staff and category moderators to silence users in specific categories

### Configuration

There is a manage button in category settings - security (for admin)

 ![](https://global.discourse-cdn.com/meta/original/4X/4/4/d/44ddaf4f90da888d082199fca0da29fe1be052d8.png)

Because category moderators cannot access the category settings, they get an icon on the category page

![6a3f4344d3f98f0e4bf90bf52e7f236066ba7c98_2_517x94](https://global.discourse-cdn.com/meta/original/4X/5/3/b/53b3402f8e4c1ab452f3b4d906b120fa702fd862.png)

The button opens a management modal which allows one to add and remove users

 ![](https://global.discourse-cdn.com/meta/original/4X/3/c/b/3cbe61f69519963c447b68a5b7baeb438864d92d.png)

Posting in a category where the user is silenced will give an error popup

 ![1e493548d64386a701d45f313d3a99b5718b4ed1_2_517x198](https://global.discourse-cdn.com/meta/original/4X/4/7/1/471d8b2581c7bc543aab2560f729e50d4dfa1ceb.png)

Attempting to create a topic in another category and then moving it to a silenced category will fail as well

 ![e52ca04b62d621a924b2f9267e097d0e2c9f81a5](https://global.discourse-cdn.com/meta/original/4X/4/a/9/4a9e014bcbf5062a7fcb65b991e5646500aed541.png)

In addition, the “+ New Topic” and “Reply” buttons will be disabled and/or removed where applicable.

### Future developments (

_PRs welcome or PM me for funding 😉_

- Set an expiry date
- Hide category from new topic dropdown
- Hide category from move topic dropdown
- Ban users instead of silencing them
- Allow large amounts of users (currently there is no pagination or paginated loading)

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [September 3, 2024, 9:05pm UTC](https://meta.discourse.org/t/category-restrictor-plugin/324765/2 "2024-09-03T21:05:18Z")

</div>

That is really valuable moderation tool. Thanks!

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [September 20, 2024, 7:32am UTC](https://meta.discourse.org/t/category-restrictor-plugin/324765/3 "2024-09-20T07:32:33Z")

</div>

This is quite the extension to moderation. Being able to silence a user from a specific category vs a site wide and granting Category Moderators this capability is definitely a real need.

---

<div class="post-metadata">

### Author: ![cshark3000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cshark3000/32/460290_2.png) [@cshark3000](https://meta.discourse.org/u/cshark3000)
#### Post date: [January 10, 2025, 1:35pm UTC](https://meta.discourse.org/t/category-restrictor-plugin/324765/4 "2025-01-10T13:35:10Z")

</div>

@RGJ Hi!  
I’ve added the plugin to my forum, but category moderators still doesn’t have the opportunity to silence users, there is no button on the category page  
For admins it’s there and works fine

What can be wrong?

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [January 10, 2025, 2:20pm UTC](https://meta.discourse.org/t/category-restrictor-plugin/324765/5 "2025-01-10T14:20:29Z")

</div>

Thank you for reporting this. I’ve updated the plugin so it’s now compatible with the “multiple groups as category moderators” change ([280adda](https://github.com/discourse/discourse/commit/280adda09c891af9a9d406dda041fd986dd45ef7)). Everything works as it should again, you just need to update the plugin.

---

<div class="post-metadata">

### Author: ![Steradiant](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steradiant/32/360541_2.png) [@Steradiant](https://meta.discourse.org/u/Steradiant)
#### Post date: [September 10, 2025, 8:00pm UTC](https://meta.discourse.org/t/category-restrictor-plugin/324765/7 "2025-09-10T20:00:42Z")

</div>

After the plugin has been installed, it seems to work fine, but the icon is missing from all of the respective buttons. Any idea what could have gone wrong?

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [September 10, 2025, 9:43pm UTC](https://meta.discourse.org/t/category-restrictor-plugin/324765/8 "2025-09-10T21:43:51Z")

</div>

Thank you for reporting this!

That issue has now been resolved, please pull the new version and rebuild.
