Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-15 06:10:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-15 06:10:12 +0300
commitfa6089d8ad89cc12adb7dbcd78594b97f8f6ed02 (patch)
tree9be269e7738972709207fdc0e1c4d505b0834c74 /lib/gitlab/checks/push_check.rb
parentf68b31bd2c8812f4aa3654c6ab7271578c2ceea4 (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.rb10
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