Skip to content

Show base role details in drawer

What does this MR do and why?

For the group/project members list, we show a Max role column. Previously, if the user can change the role, a dropdown was shown. Otherwise, plain text was shown. We are transitioning the role details to a drawer. This MR does the following:

  1. Changes the role name to a link for both cases (can/can't change role).
  2. Shows the drawer with the role details when the role name is clicked.

Note that this MR only handles showing the basic role details in the drawer. Future MRs will add custom role details and the ability to change roles.

Before (can change roles Before (can't change roles) After Drawer
ksnip_20240514-003050 ksnip_20240514-003103 ksnip_20240514-003003 ksnip_20240514-003749

How to set up and validate locally

  1. Go to Admin Area -> Settings -> Roles and Permissions.
  2. Click the New role button and create a new custom role.
  3. Go to either a group or project, then go to Manage -> Members.
  4. Click the Invite members button to bring up the invite modal. Select a standard role, then use the modal to invite a person.
  5. Invite another person, but this time select the custom role you created.
  6. Enable the show_role_details_in_drawer feature flag. Note that after enabling the feature flag, you will be unable to change the role assigned to a user.
echo "Feature.enable(:show_role_details_in_drawer)" | rails c
  1. In the members list, verify that the role names show up as links, and the user with the custom role has a Custom role badge below the role name.
  2. Click on the role name. Verify that the drawer slides out and shows the user info, the role name, and the permissions link.

Related to #456280 (closed)

Edited by Daniel Tian

Merge request reports

Loading