Skip to content

Introduce admin_protected_branch ability

Jarka Košanová requested to merge 462398-refactor-pb into master

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

Screenshot_2024-07-11_at_9.48.53

Adding a protected branch

Screenshot_2024-07-11_at_9.49.11

Protected branches settings with a new branch

Screenshot_2024-07-11_at_9.49.41

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)

Edited by Jarka Košanová

Merge request reports

Loading