Prevent accidental deletion of protected MR source branch by repeating checks before actual deletion
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