# 非版主访问私语

**URL:** https://meta.discourse.org/t/non-moderator-access-to-whispers/226756
**Category:** Feature
**Tags:** completed, whispers
**Created:** [2022年五月11日 13:58 UTC](https://meta.discourse.org/t/non-moderator-access-to-whispers/226756 "2022-05-11T13:58:50Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Colin\_Mueller](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/colin_mueller/32/220223_2.png) [@Colin\_Mueller](https://meta.discourse.org/u/Colin_Mueller)
#### Post date: [2022年五月11日 13:58 UTC](https://meta.discourse.org/t/non-moderator-access-to-whispers/226756/1 "2022-05-11T13:58:50Z")

</div>

在我们公司，我们广泛使用“whispers”（悄悄话）进行内部沟通。

我们组织中几乎所有的角色（销售、服务、开发人员、产品经理、社区管理、用户体验、文档）都在我们的用户社区中发挥作用。对我们来说，这意味着每位员工都应该能够看到“whispers”。

在 Discourse 中，您必须是 **staff** （员工）组成员才能看到“whispers”。对我们来说，这意味着要授予 300 多人 **moderator** （版主）访问权限。这些人本来只需要 TL4 权限就足够了。

简而言之：我们所有的员工都需要看到“whispers”，但很少有人需要成为版主。

如果我们能做到以下几点，将非常有帮助：

- 有一个设置允许 TL4 用户查看“whispers”，或者……
- 如果可以列出应该能够查看“whispers”的组，而不是只允许 staff 组。
- 我们还没想到的其他更好的解决方案 😃

您怎么看？

---

<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: [2022年五月12日 05:00 UTC](https://meta.discourse.org/t/non-moderator-access-to-whispers/226756/2 "2022-05-12T05:00:40Z")

</div>

> [@Colin\_Mueller](#):
>
> TLDR：我们所有的员工都需要看到“whispers”，很少有人需要成为版主。

这无疑是一个非常有趣的问题，我非常理解你的想法，并且同意这个权限应该基于用户组。

但遗憾的是，由于我们内部设计的许多方式，这是一个重大的改变。

表面上看，这似乎是一个简单的改变……只需重写这两个方法：

> <https://github.com/discourse/discourse/blob/19677ce3f62ce0f6619040bfbf5fc87e2b0ac3ee/lib/guardian/topic_guardian.rb#L38-L44>

但 Discourse 内部的改变相当深入。

> <https://github.com/discourse/discourse/blob/19677ce3f62ce0f6619040bfbf5fc87e2b0ac3ee/app/models/topic.rb#L1908-L1908>

我们甚至有一个列来跟踪 `highest_post_number_including_whispers`……但它被称为 `highest_staff_post_number`。

这里的另一个复杂之处在于，我们需要一个用户组检查来确定用户是否可以看到“whisper”，而现在这个检查更便宜，因为我们只需查看用户记录。

我将把这个问题加入书签，以便内部讨论，看看我们是否能在这里做些什么，但遗憾的是，复杂性相当高。

---

<div class="post-metadata">

### Author: ![Robert\_McIntosh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robert_mcintosh/32/259239_2.png) [@Robert\_McIntosh](https://meta.discourse.org/u/Robert_McIntosh)
#### Post date: [2022年五月16日 19:34 UTC](https://meta.discourse.org/t/non-moderator-access-to-whispers/226756/9 "2022-05-16T19:34:51Z")

</div>

也许换个思路，创建一个新的员工会员级别？

管理员 \> 版主 \> 团队

他们仍然可以被视为“员工”，但不会出现在“关于”页面上。

我曾有其他时候，希望能够将其他员工标记到对话中，即使他们没有关注社区的大部分活动（例如，将相关反馈提交给产品团队），但又不想让他们成为版主并拥有其他特权。

---

<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: [2022年五月17日 00:09 UTC](https://meta.discourse.org/t/non-moderator-access-to-whispers/226756/10 "2022-05-17T00:09:53Z")

</div>

我明白你的意思，但我们的一般模式是转向超灵活的基于组的权限。我们已经为“分配”和“已解决”做了这件事，并将把它扩展到越来越多的部分。

---

<div class="post-metadata">

### Author: ![not-ethan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/not-ethan/32/282617_2.png) [@not-ethan](https://meta.discourse.org/u/not-ethan)
#### Post date: [2022年五月23日 21:34 UTC](https://meta.discourse.org/t/non-moderator-access-to-whispers/226756/11 "2022-05-23T21:34:45Z")

</div>

我想到的一个变通方法是使用主题聊天功能，并且只允许员工和您的团队群组访问该频道，并将其用作耳语，而不是实际的耳语功能。

---

<div class="post-metadata">

### Author: ![kris.kotlarek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kris.kotlarek/32/176919_2.png) [@kris.kotlarek](https://meta.discourse.org/u/kris.kotlarek)
#### Post date: [2022年七月1日 02:02 UTC](https://meta.discourse.org/t/non-moderator-access-to-whispers/226756/12 "2022-07-01T02:02:58Z")

</div>

Discourse 的最新版本添加了一项新功能，允许指定其他群组，这些群组的成员将能够查看/创建耳语。

 ![Screen Shot 2022-07-01 at 12.00.47 pm](https://global.discourse-cdn.com/meta/original/4X/e/0/4/e04aa2f76e8f988ad7180cac3f3bcad6315d24cd.png)

> <https://github.com/discourse/discourse/pull/17170>
>
> Before, whispers were only available for staff members.
> 
> Config has been chang…ed to allow to configure privileged groups with access to whispers. Post migration was added to move from the old setting into the new one.
> 
> I considered having a boolean column \`whisperer\` on user model similar to \`admin/moderator\` for performance reason. Finally, I decided to keep looking for groups as queries are only called for current user and didn't notice any N+1 queries.

---

<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: [2022年七月1日 04:43 UTC](https://meta.discourse.org/t/non-moderator-access-to-whispers/226756/13 "2022-07-01T04:43:07Z")

</div>

@Colin_Mueller 更改应该已在您的网站上生效 🎊

感谢您的建议，这确实是许多人想要的。这里有一个重复的模式，使用 TL 作为网关或 Staff 作为网关往往不如允许基于组的权限灵活。

---

<div class="post-metadata">

### Author: ![Colin\_Mueller](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/colin_mueller/32/220223_2.png) [@Colin\_Mueller](https://meta.discourse.org/u/Colin_Mueller)
#### Post date: [2022年七月1日 08:33 UTC](https://meta.discourse.org/t/non-moderator-access-to-whispers/226756/14 "2022-07-01T08:33:05Z")

</div>

嘿 @sam

哇！这真是太棒了。这将极大地帮助我们。非常感谢。

---

<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: [2022年七月15日 04:43 UTC](https://meta.discourse.org/t/non-moderator-access-to-whispers/226756/15 "2022-07-15T04:43:26Z")

</div>

此主题已在 14 天后自动关闭。不再允许回复。
