Skip to content

Prevent accidental deletion of protected MR source branch by repeating checks before actual deletion

Douwe Maan requested to merge dm-always-verify-source-branch-can-be-deleted into master

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/34456

I didn't add the check in either the DeleteBranchService or Gitlab::Checks::ChangeAccess, since I think it makes sense to repeat the diff_head_commit == source_branch_head check too, and because it would be very hard to pass a flag from MergeWorker to ChangeAccess all the way through gitlab-shell and the internal API.

Edited by Douwe Maan

Merge request reports