Preliminary spec for this feature.
Overview
Moderator authority may optionally be assigned for a particular category and its subcategories rather than over the entire site.
- This feature does not replace the existing whole-site moderator role.
- This feature does not alter the site-global access privileges associated with Trust Levels.
- The definition of “staff” (admin or global moderator) does not change with this feature. Category moderators are not considered to be staff.
A moderated category is not necessarily a private category. Restricting general access to the category remains an admin function using the current category security controls.
There can be multiple moderators for a category.
Authority
A category moderator will have authority to do the following, always restricted to the categories that they moderate:
- create sub-categories within the categories
- delete, edit, wikify posts in the categories
- delete, close, auto-close, reopen, archive, unlist/list topics in the categories
- pin topic (category-scope pin, not global)
- Change Category settings: color, name, description, security, auto-close time, images, badges-enabled.
- Do NOT allow to change: Email-in address, Fixed position.
- Change title and category for a topic, as long as they moderate both source and destination (NB: TL3 permissions will let them move topics anywhere)
- change category name
- restrict sub-category access
- invite new members with access to the category (this does not override the the
must_approve_users
site setting) - view/export list of users who can post in that category? or are members of any group with write permission for that category? (should not include admin, site moderator, TL4s)
Category moderators will not have authority to:
- pin topics globally
- banner topics
- move a topic to any category they do not moderate (unless also TL3)
- impersonate users
Category Moderator authority can also be assigned or removed by an admin or full site moderator. No automatic revocation of authority.
Appointment or dismissal of category moderators will be a Staff function.
No changes to the standard authority structure for other (non-moderator) users to carry out actions in a moderated category.
UI Implications
UI switches that check if the user is a staff member will have to be reworked, as access to some moderation features can be had without being a full-site moderator.
No special badge for category moderators. Posts by category moderators will not be distinguished in any way from posts by other users.
Category Edit dialog
- category moderator can see and use the Edit button & dialog on the Category page
- on the Security tab (
edit_category_security.hbs
), add list of moderators beneath the current Permissions section; staff only can appoint or dismiss moderators here - for the “email in” and “fixed positions” settings in the Category Edit dialog, change the text (for category moderators) to indicate that this is an admin-only feature, with no links to the inaccessible
/admin
pages.
Need UI for…
- create sub-category under moderated category (available to category moderators)
API Changes
- add list of category moderators to JSON representation of a category
- category#update options: add moderator appointment & dismissal
Implementation Notes
We already have a CategoryUser
class. Add a moderator
flag to that. But do not interfere with any existing notification_level
setting. Default notification level for a newly-assigned moderator should be the maximum value.
Extend the existing Guardian
functionality to cover moderator powers. Try to avoid making a new thing for this.
For the items listed above that relate to permissions and invites:
- every moderated category will have one associated group (generate a name for it from the category name?)
- these special category groups should not be visible to anyone besides that category moderator
- category moderator does not have authority to create additional groups
- category moderator may only change permissions for any sub-category, as follows: remove “everyone” access; add access for the category group (per 1. above).
- category moderators should not be able to fiddle with permissions for any of the other automatic groups (admins etc.)
- category moderator can use the Invite button at the bottom of any topic: such invites will include access to the category group.
- category moderator can use the Invite function to invite existing members into the category group, not just unregistered users.
TBD
Can moderator create additional groups within the category? i.e. subcategories with different group permissions.
Perhaps category-specific Trust Levels could be defined. Not in phase 1.
https://meta.discourse.org/t/what-do-user-trust-levels-do/4924/6
Feature discussion is at https://meta.discourse.org/t/category-specific-moderators/11668/99