Allow moderators to create groups

Sure then my call here is why do we even need a site setting? Why not just allow moderators to create groups? I wonder if we should strip this magic category setting and just allow mods to create groups and categories?

3 个赞

I would certainly not object to that personally, but I can see sites that don’t want moderators to have the ability to significantly alter the site organization. I’ll leave it up to you to make the decision, I’d be fine either of the 3 ways: new site setting, combine with existing site setting, remove existing site setting and just grant access.

1 个赞

@codinghorror what is your call here?

  1. New site setting for allow moderators to create groups

  2. Rename allow moderators to create categories to allow moderators to create groups and categories

  3. Remove allow moderators to create categories and just allow them to create categories and groups by default.

I am leaning towards 1 cause it is the least risk.

6 个赞

Hmm, I’d first audit all customers and see how many people have the existing setting in place and turned on. If it’s almost nobody then I favor deleting the setting and changing the default.

3 个赞

Tricky thing though is that removal of the setting would increase the rights of all discourse mods.

The only increased surface area though is that a rogue moderator can create lots of groups and categories. There is no permission escalation, they will still be able to be excluded from certain groups and categories (and also exclude themselves)

3 个赞

I’ll pull the numbers later today.

I’m not following your logic here. If nobody has enabled the setting, we can infer that they don’t care and are OK with mods having category creation rights, but we could also very well infer that they intentionally left the setting disabled and as they don’t want mods having category creation rights.

3 个赞

And here are the numbers @codinghorror. Out of all our hosted sites, 90.03% kept the setting false, as is the default. 9.97% enabled the setting allowing mods to create categories.

10 个赞

想了解一下之前这段对话的结果。版主可以创建群组吗?

或者,是否可以让达到特定信任等级的用户创建群组?

在我的网站上,这两个问题的答案似乎都是“否”,但我希望能确认一下,因为具备这个功能会很有帮助。

你指的真的是用户组(用户集合),而不是话题分类(话题集合)吗?描述你的问题可能比直接提供解决方案更有帮助。

1 个赞

是的,我指的是群组。我只是想了解目前是否允许用户(无论是版主、特定信任等级用户还是其他角色)创建群组。

我想你需要一个插件。

不过,你的意图仍然不太清楚。人们打算对这些群组做什么?发送群聊私信?获取标识?

2 个赞

只是想确认用户是否可以创建群组。目前就这些。听起来开箱即用的答案是不行。

我建议我们重命名:

无需新增站点设置,只需重命名现有选项并扩大其适用范围,这样该选项的逻辑更合理。

如果只赋予版主创建分类的权限,却不允许他们创建群组,这显得非常不合常理。

@codinghorror,我是否应将此安排到下一个版本中?

12 个赞

具有特定信任级别的用户是否可以创建群组?其他任何信任级别的用户都可以申请加入该群组,或由创建者邀请加入。创建者默认成为该群组的拥有者。

这一想法借鉴了游戏公会/联盟/团队的运作模式。这或许可以作为一个外部插件实现,但已有多个论坛通过扩展功能实现了类似特性。这也类似于 Facebook 群组,人们可以因对某事物感兴趣而申请加入。

2 个赞

我在开发这个新功能方面取得了不错的进展,我认为它快要可以发布了。不过,@jomaxro 发现了一个奇怪的小边缘情况……

版主可以将群组的可见性更改为“群组所有者”,这意味着他们一旦更新群组,就无法再看到该群组,因此也无法再管理该群组。如果他们在更新后在群组设置中四处点击,就会出现错误,导致用户体验不够优雅。

关于如何处理这个问题,大家有什么想法?是否应该让后端检测到他们刚刚更新到了一个导致自己失去访问权限的状态,并强制前端返回到群组索引页面?还是我们根本不应该允许他们更新到这种无法访问的状态?

3 个赞

正在思考其他权限变更的示例。

如果版主修改了分类设置,导致其无法再查看该分类,他们会被重定向到 404 页面。这不太理想,但不会报错。

如果用户被登出(由管理员通过控制台等操作),他们会看到一个弹窗,随后被重定向到首页。

我认为最简单的方案是直接重定向到群组索引页面。更复杂的方案是显示一个弹窗,说明他们已无法查看该群组,并提供一个按钮将其重定向到群组索引页面。

既然我们正在重构,或许可以借此改善当前版主修改分类权限后失去可见性的情况。强制重定向到 /c 比显示 404 页面更友好。如果我们想做得更细致,也可以先显示一个弹窗。

很期待 Robin 和 Sam 的意见。

3 个赞

我认为这些人执行的操作相当愚蠢,因此我们不必很好地支持它也是合情合理的。我觉得 Josh 建议的重定向到首页是个好主意。

3 个赞

如果能将这一功能扩展至不仅限于版主,还包括具有特定信任级别的用户,那就太好了。这将允许用户创建自己的群组/团队/战队。这在许多游戏论坛中很常见。团队队长可以邀请其他成员加入他们的团队,或者成员可以申请加入。团队可以拥有专属的主题帖子,只有他们自己可以查看和回复。团队领导者可以选择团队名称,并可以为团队添加横幅或标志。

2 个赞

特定的信任等级或群组成员资格听起来非常适合用于添加创建群组的功能。我想信任等级应该就足够了,因为它可以分配给群组(尽管我认为这适用于所有成员,而不仅仅是所有者)。

此功能最近已合并,但我们似乎疏忽了提及它。对此深感抱歉!

使用非常简单:启用 moderators_manage_categories_and_groups 设置,即可让版主在网站上创建和/或管理群组。

8 个赞