Use GraphQL to create custom role on Roles and Permissions page
requested to merge 435483-use-graphql-to-create-custom-role into 434431-use-graphql-to-delete-custom-role
What does this MR do and why?
On 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 creation of a custom role to use GraphQL instead of the REST API.
How to set up and validate locally
- Set your local gdk instance to SAAS mode by running this in a terminal and (re)starting GDK:
export GITLAB_SIMULATE_SAAS=1
- To go
Admin Area
->Overview
->Groups
. - Click on the
Edit
button next to a top-level group, change the group's plan toUltimate
, and click onSave changes
at the bottom of the page:
- Go to the group's page, then go to
Settings
->Roles and Permissions
. - Click on the
Add new role
button on the upper right. - Fill out the form, then click on
Create new role
. - Verify that the role is created using GraphQL.
- Verify that the roles table shows the new role.
- Try to create a new role again, but this time check only
Admin vulnerability
. - Verify that an error message is shown saying that
Read vulnerability
needs to be checked as well.
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 #435483 (closed)
Edited by Daniel Tian