Skip to content

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
image image

Before it always showed [Base access level] - custom

How to set up and validate locally

  1. Make the Flight group Ultimate tier, /admin/groups/flightjs/edit image
  2. Create a custom role using the UI: https://gdk.test:3443/groups/flightjs/-/settings/roles_and_permissions
  3. Assign to the custom role to a group member using the REST API
  4. Enable feature flag: echo 'Feature.enable(:custom_roles_in_members_page)' | rails c
  5. 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.

Edited by Eduardo Sanz García

Merge request reports