Add `permissions` argument to memberRoleCreate mutation
What does this MR do and why?
This change introduces a permissions argument to the memberRoleCreate mutation to simplify the frontend usage.
Screenshots or screen recordings
How to set up and validate locally
- Visit the GraphQL explorer. (e.g. http://gdk.test:3000/-/graphql-explorer)
- Create a new role with the
permissionsargument.mutation createRole { memberRoleCreate( input: {groupPath: "flightjs", name: "example", description: "test role", permissions: ["read_vulnerability"], baseAccessLevel: GUEST} ) { errors memberRole { id name description readVulnerability enabledPermissions baseAccessLevel { integerValue stringValue } } } } - Verify that the response includes the permission in the
enabledPermissionsfield.{ "data": { "memberRoleCreate": { "errors": [], "memberRole": { "id": "gid://gitlab/MemberRole/7", "name": "example", "description": "test role", "readVulnerability": true, "enabledPermissions": [ "READ_VULNERABILITY" ], "baseAccessLevel": { "integerValue": 10, "stringValue": "GUEST" } } } } }
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 mo khan
