Commit 53504928427ad6ffcc451bff9da86d9fbad580b8

Authored by Dmitriy Zaporozhets
1 parent 207f34b8

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 43  
44 44 def push_allowed?(user, project, ref, oldrev, newrev, forced_push)
45 45 if user && user_allowed?(user)
46   -
47 46 action = if project.protected_branch?(ref)
48   - if forced_push
  47 + if forced_push.to_s == 'true'
49 48 :force_push_code_to_protected_branches
50 49 else
51 50 :push_code_to_protected_branches
... ...