SAML API incorrectly responds with "access_level does not have a valid value"
Summary
The SAML API gives back a 400 bad request with error "access_level does not have a valid value" when calling /groups/:id/saml_group_links on a top-level group with access_level 5 (Minimal Access).
As per the documentation this is a valid value for top-level groups: https://docs.gitlab.com/user/permissions/#roles
The SAML group links GUI does allow you to set the link with access level Minimal Access.
Steps to reproduce
- Create a top-level group.
- Send a POST request to the
/groups/:id/saml_group_linksAPI endpoint with theaccess_levelfield value set to5. Using the ID of the top-level group.
Example Project
Error is only present on the API.
What is the current bug behavior?
Returns a 400 bad request with error.
What is the expected correct behavior?
Return a 201 created and create the SAML group link.
Relevant logs and/or screenshots
Edited by 🤖 GitLab Bot 🤖
