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>2021-02-16 12:09:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-16 12:09:36 +0300
commita57cec4bb89b61d210d4e413571b1d85d76179f6 (patch)
treec7868456df33c1849a7ff5037351bfd014a80584 /lib/gitlab/git_access.rb
parent1de9854406851f7f1b599dd3311189f16db422f3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/git_access.rb')
-rw-r--r--lib/gitlab/git_access.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index cc1f2fbd029..c5ca46827cb 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -319,10 +319,8 @@ module Gitlab
end
def check_change_access!
- return if deploy_key? && !deploy_keys_on_protected_branches_enabled?
-
if changes == ANY
- can_push = (deploy_key? && deploy_keys_on_protected_branches_enabled?) ||
+ can_push = deploy_key? ||
user_can_push? ||
project&.any_branch_allows_collaboration?(user_access.user)
@@ -453,7 +451,7 @@ module Gitlab
CiAccess.new
elsif user && request_from_ci_build?
BuildAccess.new(user, container: container)
- elsif deploy_key? && deploy_keys_on_protected_branches_enabled?
+ elsif deploy_key?
DeployKeyAccess.new(deploy_key, container: container)
else
UserAccess.new(user, container: container)
@@ -532,10 +530,6 @@ module Gitlab
def size_checker
container.repository_size_checker
end
-
- def deploy_keys_on_protected_branches_enabled?
- Feature.enabled?(:deploy_keys_on_protected_branches, project)
- end
end
end