Expose list of custom roles to the frontend
What does this MR do and why?
Expose the list of the valid custom roles to the frontend. In addition, it exposes the real name and ID of the custom role if the member is associated to one.
The data appears as a data-members-data
for the element <div class="js-group-members-list-app" ...>
on the group and project member pages, for example: https://gdk.test:3443/groups/flightjs/-/group_members
EE: true
Changelog: changed
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
Before it always showed [Base access level] - custom
How to set up and validate locally
- Make the
Flight
groupUltimate
tier,/admin/groups/flightjs/edit
- Create a custom role using the UI: https://gdk.test:3443/groups/flightjs/-/settings/roles_and_permissions
- Assign to the custom role to a group member using the REST API
- Enable feature flag:
echo 'Feature.enable(:custom_roles_in_members_page)' | rails c
- Look at the name of the
Max role
dropdown.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eduardo Sanz García