Commit 1e3cea1a authored by Kamil Trzciński's avatar Kamil Trzciński

Bring back the EE changes to CE to authentication of builds

parent 3571b97e
......@@ -240,7 +240,7 @@ module Gitlab
return unless login == 'gitlab-ci-token'
return unless password
build = ::Ci::Build.running.find_by_token(password)
build = find_build_by_token(password)
return unless build
return unless build.project.builds_enabled?
......@@ -301,6 +301,12 @@ module Gitlab
REGISTRY_SCOPES
end
private
def find_build_by_token(token)
::Ci::Build.running.find_by_token(token)
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