理解用户状态、角色和权限

:bookmark: 本指南旨在帮助理解 Discourse 中各种用户状态、角色和权限,包括它们如何影响用户能力以及它们在数据库中的存储方式。

:person_raising_hand: 所需用户级别:管理员

Discourse 具有许多内置的用户状态、角色和权限。

当从管理仪表板的用户部分查看给定用户的个人资料时,可以看到这些状态和角色:

权限状态

已激活 (Activated)

帐户具有已验证的电子邮件,因此在 Discourse 实例中处于活动状态

  • 帐户可以登录 Discourse,非活动帐户不能登录
  • 非活动帐户只能验证其电子邮件(以及完成注册所需的其他路由)。

存储users 表中的 active 布尔列

暂存 (Staged)

系统为电子邮件集成自动创建的特殊占位符帐户

  • 永远不会发送电子邮件摘要
  • 自动关注其参与的所有消息并接收回复通知
  • 可以通过电子邮件回复通知
  • 用户名和名称自动选择
  • 帐户仍然可以使用相同的电子邮件注册并“接管”暂存帐户。
  • 不能接收密码重置电子邮件

存储users 表中的 staged 字段

管理员 (Admin)

管理员用户是系统中的超级用户,他们可以:

  • 模拟非管理员
  • 更改站点设置
  • 创建群组
  • 修改站点自定义设置
  • 执行版主可以执行的所有操作
  • 阅读任何私人消息
  • 创建、删除和修改分类
  • 忽略分类权限以查看私人分类

存储users 表中的布尔字段 admin 标记任何管理员帐户。

版主 (Moderator)

具有审核站点功能的超级用户:

  • 在帖子旁的名称旁边显示盾牌图标
  • 可以执行员工可以执行的所有操作

存储users 表中的布尔字段 moderator

员工 (Staff)

员工用户是管理员或版主(或两者都是)的用户。

  • 免疫于速率限制
  • 可以处理审核队列中保留的标记和帖子
  • 可以删除主题和帖子、分割主题、合并主题、隐藏主题等。
  • 可以查看用户信息(版主除外,不显示电子邮件)
  • 可以暂停、静音、匿名化和删除用户
  • 可以调整用户的信任级别

存储:根据 users 表上的 adminmoderator 列计算得出

分类版主 (Category Moderator)

这是非员工用户,是某个群组的成员,该群组被授予对特定分类的特定版主权限。这可以通过 enable category group moderation 管理员设置在站点上启用,并在分类的“设置”选项卡中为每个分类设置:

信任级别 0 - 4 (Trust level 0 - 4)

请参阅:用户信任级别有什么作用?

存储users 表中的数字字段 trust_level

已暂停 (Suspended)

帐户已从 Discourse 实例暂停

  • 用户页面上会显示一条注释,说明暂停原因
  • 不允许登录
  • 帐户只能被员工提及
  • 用户不会收到任何通知邮件(摘要、消息等)
  • 作为一个例外,员工发起的任何电子邮件仍会发送给用户

存储users 表中的 suspended_till 日期时间列

已静音 (Silenced)

由员工手动设置,或当帐户被垃圾邮件系统标记为问题帐户时,所有发帖功能将被禁用。

  • 帐户不能回复任何主题
  • 帐户不能创建任何主题
  • 帐户不能创建私人消息,但可以回复私人消息
  • 帐户不能创建标记
  • 帐户仍然可以点赞和收藏
  • 帐户仍然可以更改用户偏好设置和“关于我”信息(待定这是否是个好主意)
  • 邮件列表模式停止工作

存储users 表中的 silenced_till 日期时间列


其他状态

用户可以具有管理仪表板权限部分未显示的一些其他状态。

新用户 (New user)

首次使用或新帐户的特殊限制帐户。new_users 具有站点设置中定义的特殊速率限制

  • 帐户创建于过去 24 小时内,信任级别为 1,或者信任级别为 0
  • 非员工帐户

限制:

  • 每 30 秒只能创建一篇文章 (rate_limit_new_user_create_post)

存储:根据 users 表上的 created_atmoderatoradmintrust_level 列计算得出

第一天用户 (First day user)

在用户首次发帖后的 24 小时内适用的特殊附加限制

  • 尚未发帖,或首次发帖时间在 24 小时前
  • 非员工帐户
  • 非 TL2 或以上

限制:

  • 仅可创建 10 次回复 (max_replies_in_first_day)
  • 仅可创建 3 个主题 (max_topics_in_first_day)

存储:根据 user_stats 表上的 first_post_created_at,以及 users 表上的 moderatoradmintrust_level 列计算得出

已批准 (Approved)

如果启用了站点设置 must_approve_users,则用户必须先被 approved 才能登录。

存储users 表中的 approved 布尔列

开发人员 (Developer)

用于安装 Discourse 的特殊帐户

  • 查看显示页面计时信息的 rack-mini-profiler
  • 模拟任何帐户,包括管理员
  • 自动成为管理员并拥有所有管理员权限

存储:通过 developer_emails 全局设置或 developers 表控制;在 Docker 安装中,使用环境变量 DISCOURSE_DEVELOPER_EMAILS 指定一组电子邮件列表作为开发人员。

附加资源

有关分类版主获得的确切权限的更详细说明,请参阅 https://meta.discourse.org/t/trust-level-permissions-table-inc-moderator-roles/224824。

90 个赞
Modifying Staff Roles to go beyond Administrator and Moderator?
List of full moderation tools?
Deactivating users permanently
Improving Blocked User State
Which setting(s) would prevent Discourse from emailing an old user?
What permissions can admins give moderators?
View Forum as User X
Levels and Staff roles
A new trust level: The Helpful member?
Understading groups in discourse
How to disable mail for staged users?
How i can manage roles for moderators and administrators?
Discourse User Roles difference
Suspend all users apart from admin users for development copy
Who is able to change profile of another user
How do I block a user?
How does discourse count users?
A single number for users ranking (reputation like)?
Allow moderators to create groups
What is a staged user?
Discourse User Features
How to activate users after a large import of mbox archives
Disable DM visibility from Admins
Understanding Discourse Trust Levels
What are "staged users"?
Additional admins & moderators / staff users on pricing page
Trying to understand "staff" slots and moderation in hosted plans
Promoting a User to Admin or Moderator Status
Moderators vs Staff
Adding users to the developers table
Error adding a backup email address: address already in use by a staged user
Trying to understand "staff" slots and moderation in hosted plans
Create staged users via API?
Admin ability to impersonate other admin differs between admins
My Wiki of useful Meta (and other) links
TOC missing after using browsers back button
Proposed: allow moderators to silence, not delete users flagged by akismet
Incorrect account stats
How to reply to staged user through discourse?
Daily Summary (9pm UTC)
Improving Blocked User State
Users who are 'activated' but not 'approved'
Why are system and super admin both mod and admin?
Why are system and super admin both mod and admin?
Does the 'Posted' field in the user card include topics in private categories?
Unlisted option on creation of a new topic
Improving Blocked User State
Are banned members supposed to receive email notifications?
What is a staff user on hosted Discourse?
Limit the daily number of posts from a user
Major slowdown for staff in large topics
For how long a new user is considered "new user"?
How to invite someone to answer a question?
Auto-remove accounts when SSO ID is not longer valid
Best strategy for member who wants to "pause"? Suspend may not be it
How might we better structure #howto?
Send email to non registered user in a group
Difference between “member” and “staff user”
Send email to non registered user in a group
New pending application generates staff notification
Change user registration date (created_at) via API
Please update 'Understanding Discourse Trust Levels' — or is there a different doc?
When you started your first Discourse community, what did you find hard to do?
Can I enforce Slow Mode on a per-user basis or limit their comments?
Understanding Discourse Trust Levels
Watch topic using email address without requiring registration
Can T4 members access personally identifiable information?
How to get an API key