# 类别限制插件

**URL:** https://meta.discourse.org/t/category-restrictor-plugin/324765
**Category:** Plugin
**Created:** [2024年九月3日 20:19 UTC](https://meta.discourse.org/t/category-restrictor-plugin/324765 "2024-09-03T20:19:44Z")
**Posts on this page:** 1
**Showing post:** 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: [2024年九月3日 20:19 UTC](https://meta.discourse.org/t/category-restrictor-plugin/324765/1 "2024-09-03T20:19:44Z")

</div>

# Discourse 分类限制器

| | | |
| --- | --- | --- |
| ℹ | **摘要** | 允许管理员和分类版主在特定分类中禁言用户 |
| 🛠 | **代码库链接** | [https://github.com/communiteq/discourse-category-restrictor](https://github.com/communiteq/discourse-category-restrictor) |
| 📖 | **安装指南** | [如何在 Discourse 中安装插件](https://meta.discourse.org/t/install-plugins-in-discourse/19157) |
| 💰 | **赞助商** | @Gotchur |

### 功能

允许管理员和分类版主在特定分类中禁言用户

### 配置

在分类设置 - 安全（管理员）中有一个管理按钮

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

由于分类版主无法访问分类设置，他们在分类页面上会看到一个图标

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

该按钮会打开一个管理模态框，允许添加和删除用户

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

在用户被禁言的分类中发帖会弹出一个错误提示

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

尝试在另一个分类中创建主题然后将其移动到被禁言的分类也会失败

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

此外，“+ 新建主题”和“回复”按钮将在适用时被禁用和/或移除。

### 未来发展 (

_欢迎提交 PR 或 PM 我获取资助 😉_

- 设置过期日期
- 从新建主题下拉列表中隐藏分类
- 从移动主题下拉列表中隐藏分类
- 禁止用户而不是禁言他们
- 允许大量用户（目前没有分页或分页加载）

---

_[View the full topic](https://meta.discourse.org/t/category-restrictor-plugin/324765)._
