Introduce admin_protected_branch ability
What does this MR do and why?
It adds admin_protected_branch
ability and replaces the permissions checks for actions related to protected branches. We will introduce admin protected branch custom permission and this is preparation for this.
In !152152 (merged) we already did that together with the frontend changes. But frontend changes caused QA test suite to fail.
This could be seen already on the original MR but we missed it and merged it anyway.
So this MR will only add the new ability and in the next MR we will introduce the "problematic" frontend changes.
I have some suspicions and ideas what could cause those failures but want to focus on that part in a separate MR. I might also need a help from frontend engineer there. So I decided to split the changes into two MRs.
Screenshosts
Protected branches settings
Adding a protected branch
Protected branches settings with a new branch
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
Play around with protected branches in project settings.
Related to #462398 (closed)