Revert "Merge branch 'id-restrict-protected-rules' into 'master'"
What does this MR do?
!52319 (merged) changed the logic for protected branch rules, trying to solve a problem where, if there were two rules with exactly the same specificity (e.g. two rules for feature/*
, one specifying developers can merge and another specifying only maintainers can, then developers can merge, contrary to expectations).
However, this had an unintended effect: now, if two rules exist with different specificities, e.g., foo/*
and foo/bar/*
, then the most permissive of those two win, whereas previously the more specific rule, foo/bar/*
, would override the one for foo/*
.
Reverting so we can consider how to approach this in a considered way, since the two-rules-with-the-same-specificity situation is an edge case that can be resolved by a project owner removing the rule they don't want, while there's no reasonable workaround for the functionality that was broken by the change.
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done