Skip to content

Apply force push settings consistently

What does this MR do and why?

Apply force push settings consistently

We recently implemented group level protected branches. The feature is still behind a disabled feature flag. During testing it was noted that force push settings are applied differently to access levels.

When group-level access levels exist, we check if any of the group-or-project-level access levels allow a user to do said action. Before this change, when a group-level protected branch existed we would completely ignore any project level protected branches.

After this change we check against all matching protected branches when evaluating if a force push is allowed or not.

For more context

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.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Joe Woodward

Merge request reports

Loading