From 53504928427ad6ffcc451bff9da86d9fbad580b8 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 3 Apr 2014 15:03:45 +0300 Subject: [PATCH] Fix support for force_push --- lib/gitlab/git_access.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb index a040129..eefdb18 100644 --- a/lib/gitlab/git_access.rb +++ b/lib/gitlab/git_access.rb @@ -43,9 +43,8 @@ module Gitlab def push_allowed?(user, project, ref, oldrev, newrev, forced_push) if user && user_allowed?(user) - action = if project.protected_branch?(ref) - if forced_push + if forced_push.to_s == 'true' :force_push_code_to_protected_branches else :push_code_to_protected_branches -- libgit2 0.21.2