Commit 228f52b8 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'perform-ci-build-auth-always-on-primary-ce' into 'master'

Bring back the EE changes to CE to authentication of builds

See merge request gitlab-org/gitlab-ce!19391
parents 04236363 1e3cea1a
...@@ -240,7 +240,7 @@ module Gitlab ...@@ -240,7 +240,7 @@ module Gitlab
return unless login == 'gitlab-ci-token' return unless login == 'gitlab-ci-token'
return unless password return unless password
build = ::Ci::Build.running.find_by_token(password) build = find_build_by_token(password)
return unless build return unless build
return unless build.project.builds_enabled? return unless build.project.builds_enabled?
...@@ -301,6 +301,12 @@ module Gitlab ...@@ -301,6 +301,12 @@ module Gitlab
REGISTRY_SCOPES REGISTRY_SCOPES
end end
private
def find_build_by_token(token)
::Ci::Build.running.find_by_token(token)
end
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment