# 在审核页面上，标签仅限于主题所有者权限

**URL:** <https://meta.discourse.org/t/on-review-page-tag-restricted-to-the-topic-owner-privileges/250021>\
**Category:** Bug\
**Created:** [2022年十二月28日 15:53 UTC](https://meta.discourse.org/t/on-review-page-tag-restricted-to-the-topic-owner-privileges/250021 "2022-12-28T15:53:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)\
**Post date:** [2022年十二月28日 15:53 UTC](https://meta.discourse.org/t/on-review-page-tag-restricted-to-the-topic-owner-privileges/250021/1 "2022-12-28T15:53:46Z")

</div>

您好，

如果一个标签组设置 🔽

 ![Screenshot 2022-12-28 at 16.26.54](https://global.discourse-cdn.com/meta/original/4X/b/3/7/b3717d97bf87f4247f2321171c9eb0860df5a8f4.png)

被设置为与可审核主题的所有者不同的组，那么该主题将无法使用该标签进行批准。

* * *

重现步骤：

1. 开启 `review every post` 站点设置进行测试。

2. 创建一个带有标签的标签组，并将 **Tags are visible only to the following groups** 设置为例如：staff  

3. 创建一个由非 staff 用户创建的主题。我用一个 TL1 用户创建的。  

4. 点击编辑并添加您在第 2 点创建的标签。

5. 点击 Approve Post 按钮。

它会显示一个警告模态框。

 ![Screenshot 2022-12-28 at 16.41.41](https://global.discourse-cdn.com/meta/original/4X/0/2/b/02b8978d8bbfbae1fd444135d01731f4ce4c780b.png)

以及一个控制台错误。

 ![Screenshot 2022-12-28 at 16.43.45](https://global.discourse-cdn.com/meta/original/4X/b/6/3/b639fd320b6196e7f127e22f5866385d792f521a.png)

看起来审核页面限制了主题所有者的权限。

谢谢 🙂

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [2023年一月4日 08:59 UTC](https://meta.discourse.org/t/on-review-page-tag-restricted-to-the-topic-owner-privileges/250021/4 "2023-01-04T08:59:44Z")

</div>

```ruby
opts.merge!(guardian: Guardian.new(performed_by)) if performed_by.staff?

```

现在，我们将使用审阅者的“`guardian`”在创建帖子/主题时进行审批，以 **在所有地方** 检查权限。希望这没问题。

> <https://github.com/discourse/discourse/pull/19710>
>
> We previously used post creator's guardian permissions which will raise an error… if reviewer added a staff-only (restricted) tag. Now we're using the reviewer's "\`guardian\`" to check permissions \*\*everywhere\*\* while creating posts/topics by approval.

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [2023年一月10日 08:07 UTC](https://meta.discourse.org/t/on-review-page-tag-restricted-to-the-topic-owner-privileges/250021/6 "2023-01-10T08:07:52Z")

</div>


