Skip to content

FRONT: Add canModerateContent permission minds#4591

Olivia Madrid requested to merge feat/mod-permission-4591 into master

Ticket(s) / Related Merge Requests

minds#4591 (closed)

Summary of Changes

  • New CAN_MODERATE_CONTENT permission added
  • It is configurable (aka can be toggled in the admin>roles tab)
  • For new tenant sites, it will be automatically applied to the following roles: owner, admin, moderator. (For existing tenant sites, it must be manually applied by @markharding)
  • Users cannot load the reports list or issue verdicts unless they have the CAN_MODERATE_CONTENT permission
  • Users with CAN_MODERATE_CONTENT permission (that do NOT have owner role or admin role) can now see the "Admin" sidenav tab. But when they click on the tab, they will have a different UX to those with owner/admin roles:
    • clicking the sidenav "Admin" tab will bring them to the /network/admin/moderation/reports page instead of /network/admin/general
    • they cannot see any other top level tabs except for "moderation"
    • on the Moderation page, they cannot see any other second level tabs except for "reports"
    • they cannot see the NSFW toggle
  • Users with admin/owner role who do do NOT have CAN_MODERATE_CONTENT permission can NOT see the moderation > reports tab. When they click on the moderation tab, they will be directed to community-guidelines instead.

Testing Considerations

Sandbox site: https://olivia2.oke.minds.io/

  • Tenant admin console > moderation tab
  • Tenant admin console > roles tab
  • Sidenav "admin" link
  • Viewing reports and issuing verdicts

Deployment Considerations

Engine branch engine!1579 (merged) must be merged

Regression Scope

Reports, sidenav, tenant admin console access

Platform Affected (web, mobile, etc)

Web

Developer Testing Completed

  • Everything listed in summary of changes

Screenshots / Screen Recording

Roles tab toggle

image

Moderation permissions holder (who is not owner/admin) sees admin tab in sidenav

image

They have limited access to functionality in the admin console

image

An admin without moderation permission cannot see the reports queue

image

Does this impact

  • Localization
  • Dark/light mode
  • Guest mode

Definition of Done Checklist

  • The Acceptance Criteria has been met
  • Code is tested: Testing includes unit/spec, E2E/automated and manual testing
  • Merge requests description has been filled out
Edited by Olivia Madrid

Merge request reports

Loading