diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-06-04 23:25:46 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-06-04 23:25:46 +0300 |
commit | 1e3cea1a0f41096bb95c2398f2b1ff7d8c9bc250 (patch) | |
tree | d398b1e5dcacc5e66e3d59f6f33f102d94af2b29 /lib/gitlab/auth.rb | |
parent | 3571b97effd81f9a84f238f918544c6e5c625b76 (diff) |
Bring back the EE changes to CE to authentication of builds
Diffstat (limited to 'lib/gitlab/auth.rb')
-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 |