Commit 53504928427ad6ffcc451bff9da86d9fbad580b8
1 parent
207f34b8
Exists in
spb-stable
and in
3 other branches
Fix support for force_push
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
1 additions
and
2 deletions
Show diff stats
lib/gitlab/git_access.rb
@@ -43,9 +43,8 @@ module Gitlab | @@ -43,9 +43,8 @@ module Gitlab | ||
43 | 43 | ||
44 | def push_allowed?(user, project, ref, oldrev, newrev, forced_push) | 44 | def push_allowed?(user, project, ref, oldrev, newrev, forced_push) |
45 | if user && user_allowed?(user) | 45 | if user && user_allowed?(user) |
46 | - | ||
47 | action = if project.protected_branch?(ref) | 46 | action = if project.protected_branch?(ref) |
48 | - if forced_push | 47 | + if forced_push.to_s == 'true' |
49 | :force_push_code_to_protected_branches | 48 | :force_push_code_to_protected_branches |
50 | else | 49 | else |
51 | :push_code_to_protected_branches | 50 | :push_code_to_protected_branches |