Add `available_from_access_level` property to custom role abilities
What does this MR do and why?
The available_from_access_level
property defines the access level from which the ability is available, when applicable.
It is exposed in the GraphQL API on the CustomizablePermissionType
.
Issue: #426740 (closed)
Screenshots or screen recordings
How to set up and validate locally
- create a new ability by running the following command
ee/bin/custom-ability new_custom_ability -f -d 'ability description' -c 'ability category' -M '16.9' -m 'https://mr' -i 'https://issue' -g -p -r read_code
- restart rails
gdk restart rails-web
- Visit http://localhost:3000/-/graphql-explorer and run the following query:
query { memberRolePermissions { nodes { name availableFromAccessLevel { integerValue stringValue } } } }
- Verify the new ability is returned with the correct access level from which it is available
Edited by Alex Buijs