diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-06-05 08:04:55 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-06-05 08:04:55 +0000 |
commit | 228f52b83bc02ed502714cecdff21d83cb5ca332 (patch) | |
tree | 39c9fff75ce6e6011bcf73fb73360edeae58c5bb | |
parent | 04236363bce399fbde36f396fdcf51d61735e1b0 (diff) | |
parent | 1e3cea1a0f41096bb95c2398f2b1ff7d8c9bc250 (diff) | |
download | gitlab-ce-228f52b83bc02ed502714cecdff21d83cb5ca332.tar.gz |
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
-rw-r--r-- | lib/gitlab/auth.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb index 0f7a7b0ce8d..7de66539848 100644 --- a/lib/gitlab/auth.rb +++ b/lib/gitlab/auth.rb @@ -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 |