Commit 53504928 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix support for force_push

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 207f34b8
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment