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:
- Changes the role name to a link for both cases (can/can't change role).
- 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 |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
- Go to
Admin Area->Settings->Roles and Permissions. - Click the
New rolebutton and create a new custom role. - Go to either a group or project, then go to
Manage->Members. - Click the
Invite membersbutton to bring up the invite modal. Select a standard role, then use the modal to invite a person. - Invite another person, but this time select the custom role you created.
- Enable the
show_role_details_in_drawerfeature 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
- In the members list, verify that the role names show up as links, and the user with the custom role has a
Custom rolebadge below the role name. - 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



