From d88abcc9164b95e4fb6143a2dc5b3a1a38827874 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 09 2019 13:16:06 +0000 Subject: Allow deleting branches via git on forks On dist-git we do not allow deleting branches via git (or the UI) in main projects, but on forks they are both allowed. Signed-off-by: Pierre-Yves Chibon --- diff --git a/dist_git_auth.py b/dist_git_auth.py index a1c2362..71ea0cc 100644 --- a/dist_git_auth.py +++ b/dist_git_auth.py @@ -148,7 +148,7 @@ class DistGitAuth(GitAuthHelper): return False # Do not allow branch deletions - if revto == '0'*40: + if not project.is_fork and revto == '0'*40: self.info("Branch deletion is not allowed") return False