Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add moderator role and add pundit policies for admin actions #5635

Merged
merged 6 commits into from
Nov 11, 2017

Conversation

Gargron
Copy link
Member

@Gargron Gargron commented Nov 9, 2017

Fix #1784

Before:

  • User
  • Admin

After:

  • User
  • Moderator
  • Admin

In the admin UI:

  • Admins can promote local users to moderator or admin
  • Admins can demote moderators back to users
  • Admins cannot demote fellow admins (only rake task can do it, see below)
  • Moderators cannot disable 2FA, reset password, silence, suspend, or disable login of fellow moderators or admins
  • Only admins can memorialize (turn into memoriam page) users and cannot do so to fellow admins
  • Only admins can fiddle with protocol-related functions such as redownloading avatars, WebSub subscriptions
  • Moderators can enable/disable custom emojis but only admins can upload/copy/delete them
  • Moderators can handle reports and silence/suspend/unsilence/unsuspend users
  • All other functions and areas are admin-only

New rake tasks:

  • mastodon:make_mod to turn user into moderator
  • mastodon:revoke_staff to turn admin/mod into a normal user again

@Gargron Gargron added moderation Administration and moderation tooling work in progress Not to be merged, currently being worked on labels Nov 9, 2017
@Nanamachi
Copy link
Contributor

Great feature! I'm waiting for this.

How is separate 'ability table' for flexibility? There may be an instance that needs customized or more multi-level abilities.

@Gargron Gargron removed the work in progress Not to be merged, currently being worked on label Nov 10, 2017
Copy link
Contributor

@beatrix-bitrot beatrix-bitrot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please give us a button in the UI to make someone a mod

@Gargron Gargron merged commit 7bb8b0b into master Nov 11, 2017
@Gargron Gargron deleted the feature-moderator branch November 11, 2017 19:23
Gargron pushed a commit that referenced this pull request Nov 11, 2017
* i18n: Update Polish translation (for #5635)

* 😑🔫
Gargron pushed a commit that referenced this pull request Nov 14, 2017
* i18n: (zh-CN) Bug fix for note-counter.

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add missing translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add support.array key for better wording

* Revert "i18n: (zh-CN) Add support.array key for better wording"

This reverts commit 27bf9a9.
Looks like this commit can't get pass the checks, revert it for now.

* i18n: (zh-CN) Change `客户端` to `应用`

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add missing translations (#5635)

* i18n: (zh-CN) Change `两步验证` to `双重认证`

* i18n: (zh-CN) Improve translations
@Gargron Gargron mentioned this pull request Nov 27, 2017
10 tasks
cobodo pushed a commit to cobodo/mastodon that referenced this pull request Dec 6, 2017
…n#5635)

* Add moderator role and add pundit policies for admin actions

* Add rake task for turning user into mod and revoking it again

* Fix handling of unauthorized exception

* Deliver new report e-mails to staff, not just admins

* Add promote/demote to admin UI, hide some actions conditionally

* Fix unused i18n
cobodo pushed a commit to cobodo/mastodon that referenced this pull request Dec 6, 2017
* i18n: Update Polish translation (for mastodon#5635)

* 😑🔫
cobodo pushed a commit to cobodo/mastodon that referenced this pull request Dec 6, 2017
* i18n: (zh-CN) Bug fix for note-counter.

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add missing translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add support.array key for better wording

* Revert "i18n: (zh-CN) Add support.array key for better wording"

This reverts commit 27bf9a9.
Looks like this commit can't get pass the checks, revert it for now.

* i18n: (zh-CN) Change `客户端` to `应用`

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add missing translations (mastodon#5635)

* i18n: (zh-CN) Change `两步验证` to `双重认证`

* i18n: (zh-CN) Improve translations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moderation Administration and moderation tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants