Use GraphQL to fetch custom roles on Roles and Permissions page
What does this MR do and why?
For the Roles and Permissions page in a group's settings or the admin area, there's a table that shows created custom roles:
Group Roles and Permissions page | Admin Area Roles and Permissions page |
---|---|
This MR switches the fetching of the custom roles data from REST to GraphQL.
How to set up and validate locally
For self-managed:
- Enable the
custom_roles_ui_saas
andcustom_roles_ui_self_managed
feature flags. - Go to a top-level group and go to
Settings -> Roles and Permissions
. - Create some custom roles using the
Add new role button
. Verify that they show up in the list. - Go to
Admin Area -> Settings -> Roles and Permissions
. - Use the group dropdown to select a group. Create some custom roles and verify that they show up in the list.
For SAAS:
- Run
export GITLAB_SIMULATE_SAAS=1
in a terminal and restart gdk. - Go to
Admin Area -> Overview -> Groups
. Click on theEdit
button for a top-level group. - Change the group's plan to
Ultimate
. Save the change. - Go to
Admin Area -> Settings -> Roles and Permissions
. - Use the group dropdown to select a group. Verify that it shows the "The {name} group is not in the ultimate tier" alert.
- Now select the group you changed to Ultimate tier. Verify that the alert is removed and it shows custom roles.
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.
Related to #431713 (closed)
Edited by Daniel Tian