Skip to content
Snippets Groups Projects

Add admin and moderator indicators to the user profile

Revives !250 (closed)

The complementary BE MR is merged now.

Updated video that shows how the settings change take place: https://cl.ly/483e72275867

Screenshots of how badges look in different themes:

(Updated styling with theming support as per @hj's feedback (I used .alert with neutral gray that — the button background color that is optimized to be aligned with different themes):

BE provides two JSON fields: role (which can be admin, moderator, or default member) and show_role. A few notes

  • If the user chooses not to display role, BE doesn't include role in the JSON response when giving this user's data to other users.

  • show_role is visible only to the current user and is used for toggling the parameter in the user settings UI

Edited by Eugenij

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Eugenij added 1 commit

    added 1 commit

    • 63d20fd6 - Refactor visibleRole for better readability

    Compare with previous version

  • Eugenij changed the description

    changed the description

  • Maintainer

    can we not use mastodon-mimicking style btw? I'd rather use same style as errors except with different color

  • HJ
  • HJ
    • Maintainer
      Resolved by Shpuld Shpludson

      I don't think you need to show [Admin]/[Moderator] above post form, it's distracting and gives you info you don't really need. (unless you need a reminder that you're admin and you should behave accordingly)

  • Eugenij added 1 commit

    added 1 commit

    • 91a75849 - Refactor visibleRole for better readability

    Compare with previous version

  • Eugenij added 1 commit

    added 1 commit

    • f874df69 - Add theming support for admin/moderator badges

    Compare with previous version

  • Eugenij changed the description

    changed the description

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading