Allow handling instance custom roles via graphql
What does this MR do and why?
It allows handling instance-level custom roles via GraphQL.
Related MR: !139357 (closed)
How to set up and validate locally
- test handling both group custom roles (you have to be a group owner) and instance level custom roles (you have to be an admin)
- instance-level custom roles should work only on self-managed
- group-level custom roles should work only on SaaS (check Simulate a SaaS instance guide)
GraphQL queries to test
Create
mutation {
memberRoleCreate(input: {
groupPath: "flightjs"
name: "Role name",
description: "This is a new test role",
readCode: true,
readVulnerability: true,
baseAccessLevel: GUEST
}) {
errors
memberRole {
id
name
}
}
}
Update
mutation {
memberRoleUpdate(input: {
id: "gid://gitlab/MemberRole/11",
name: "New name",
description: "This is a test role new"
}) {
errors
memberRole {
id
name
description
}
}
}
Delete
mutation {
memberRoleDelete(input: {
id: "gid://gitlab/MemberRole/11"
}) {
errors
memberRole {
id
name
description
}
}
}
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 #429278 (closed)
Edited by Jarka Košanová