diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-15 06:10:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-15 06:10:12 +0300 |
commit | fa6089d8ad89cc12adb7dbcd78594b97f8f6ed02 (patch) | |
tree | 9be269e7738972709207fdc0e1c4d505b0834c74 /lib/gitlab/checks/push_check.rb | |
parent | f68b31bd2c8812f4aa3654c6ab7271578c2ceea4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/checks/push_check.rb')
-rw-r--r-- | lib/gitlab/checks/push_check.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/gitlab/checks/push_check.rb b/lib/gitlab/checks/push_check.rb index 0f0d8bb82ec..47aa25aae4c 100644 --- a/lib/gitlab/checks/push_check.rb +++ b/lib/gitlab/checks/push_check.rb @@ -14,17 +14,9 @@ module Gitlab private def can_push? - user_access_can_push? || + user_access.can_push_for_ref?(ref) || project.branch_allows_collaboration?(user_access.user, branch_name) end - - def user_access_can_push? - if Feature.enabled?(:deploy_keys_on_protected_branches, project) - user_access.can_push_to_branch?(ref) - else - user_access.can_do_action?(:push_code) - end - end end end end |