-
Douwe Maan authored
Backport changes from gitlab-org/gitlab-ee!581 ## What does this MR do? Backports changes that were made in gitlab-org/gitlab-ee!581, to avoid potential merge conflicts in the future. ## What are the relevant issue numbers? - Related to gitlab-org/gitlab-ee!581 ## Does this MR meet the acceptance criteria? ## Tasks - [ ] !5824 Backport changes from EE!581 to CE - [x] Implementation - [x] ::ProtectedBranches::CreateService.new - [x] Can't remove `load_protected_branches_gon_variables` - [x] `has_many` with count enforced - [x] Extract from access levels - [x] project.protected_branches.create(params) - [x] Improve "access_levels.first" - [x] Fix tests - [x] Fix build - [x] Assign to Douwe - [ ] Wait for review/merge See merge request !5824
75f216cb