Fix issues with Member Roles API
What does this MR do and why?
This fixes 3 issues with the Member Roles API:
- Ability to save permissions from the frontend
- Ability to save permissions with requirements
- Better error messages
This also adds a feature spec for saving member roles with requirements, so we will be able to detect regressions in the future.
Related to: https://gitlab.slack.com/archives/C0610LVCSAY/p1702558424950109
How to set up and validate locally
- Create a group with Ultimate license
- Go to http://localhost:3000/groups/${new_group}/-/settings/roles_and_permissions and create a custom role with
Admin vulnerability
andRead vulnerability
permissions. - Verify the role was created successfully with the correct permissions.
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 Alex Buijs