Skip to content

Show custom role name for usage quotas seats memberships list

What does this MR do and why?

We have the ability to create custom roles, which can be assigned to users of a group. On the usage quotas page, a list of users are shown with their roles for each group. This list was incorrectly showing the base role when a custom role is assigned to a user. This MR fixes it by showing the custom role instead.

Before After
ksnip_20240419-000417 ksnip_20240419-000308

This MR also makes the following changes:

  1. The role badge has been changed to just text.
  2. A Custom role badge is shown underneath the role name if it's a custom role.
  3. The alignment of the table cells has been changed from middle to top.

How to set up and validate locally

  1. Go to any top-level group. Go to Settings -> Roles and Permissions in the sidebar.
  2. Click on Add role. Use the form to create a new custom role.
  3. Go to Manage -> Members in the sidebar.
  4. Click on Invite members. Invite any member, and in the role dropdown, scroll to the bottom and select the role you created.
  5. Go to Settings -> Usage quotas in the sidebar.
  6. In the Seats tab, expand the dropdown arrow to the left of the user to see the direct memberships list.
  7. Verify that the user's role is the custom role, and that the Custom role badge is shown.

Related to #434909 (closed)

Merge request reports