Fix support for force_push

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-04-03 15:03:45 +03:00
parent 207f34b890
commit 5350492842
No known key found for this signature in database
GPG Key ID: 627C5F589F467F17
1 changed files with 1 additions and 2 deletions

View File

@ -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