diff options
Diffstat (limited to 'lib/gitlab/user_access.rb')
-rw-r--r-- | lib/gitlab/user_access.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/gitlab/user_access.rb b/lib/gitlab/user_access.rb index fa32776d9f8..fd68b9f2b48 100644 --- a/lib/gitlab/user_access.rb +++ b/lib/gitlab/user_access.rb @@ -70,10 +70,8 @@ module Gitlab protected_branch_accessible_to?(ref, action: :push) elsif user.can?(:push_code, project) true - elsif user.can?(:push_single_branch, project) - project.branches_allowing_maintainer_access_to_user(user).include?(ref) else - false + project.branch_allows_maintainer_push?(user, ref) end end |