summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2018-03-27 17:35:27 +0200
committerTomasz Maczukin <tomasz@maczukin.pl>2018-03-27 17:35:27 +0200
commitfa723528416aa9e746a17ed8a0db6c005d766a51 (patch)
tree130373f6a31114aba986f405a34d35890aa7bdee
parente37b1c762f3c24073aa3e09e4e40b8ec071165aa (diff)
downloadgitlab-ce-44389-always-allow-http-for-ci-git-operations.tar.gz
Allow HTTP(s) when build authentication_abilities are present44389-always-allow-http-for-ci-git-operations
-rw-r--r--lib/gitlab/git_access.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index 6400089a22f..165c296bcb7 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -93,6 +93,8 @@ module Gitlab
end
def check_protocol!
+ return if build_can_download_code?
+
unless protocol_allowed?
raise UnauthorizedError, "Git access over #{protocol.upcase} is not allowed"
end