Fix ProtectedBranch access level validations
What
Fixes ProtectedBranch
/ ProtectedTag
validations.
Before an access_level
was required even if a group_id
or user_id
had been set.
I've also removed a duplicated human_access_levels
definition
Why
When improving the protected branches API in https://gitlab.com/gitlab-org/gitlab-ee/issues/4131 it was discovered that access_level
was being required even when it didn't make sense.
Acceptance criteria
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-