summaryrefslogtreecommitdiff
path: root/lib/gitlab/git_access.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2018-12-20 17:39:20 +0100
committerDouwe Maan <douwe@selenight.nl>2019-01-02 15:31:32 +0100
commit551e84c2cb5bf9a0bd8c339b012d60607383fb3e (patch)
treea030a047447281ce5a2e61fc6e8bf7d194f166b7 /lib/gitlab/git_access.rb
parentbc7a1affe3dffcfebc9f3c93d7e531d8b1a1b02f (diff)
downloadgitlab-ce-551e84c2cb5bf9a0bd8c339b012d60607383fb3e.tar.gz
Skip change access check for deploy keys
Diffstat (limited to 'lib/gitlab/git_access.rb')
-rw-r--r--lib/gitlab/git_access.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index 0558bced2c3..04a9a2ff7dc 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -266,6 +266,9 @@ module Gitlab
end
def check_change_access!
+ # Deploy keys with write access can push anything
+ return if deploy_key?
+
# If there are worktrees with a HEAD pointing to a non-existent object,
# calls to `git rev-list --all` will fail in git 2.15+. This should also
# clear stale lock files.
@@ -286,7 +289,6 @@ module Gitlab
change,
user_access: user_access,
project: project,
- skip_authorization: deploy_key?,
skip_lfs_integrity_check: skip_lfs_integrity_check,
protocol: protocol,
logger: logger