Commit cb950ba0 authored by Alain Takoudjou's avatar Alain Takoudjou

fixup! NXD lib:gitlab:auth Accept Basic auth from project runner_token

Project.with_builds_enabled.find_by(runners_token: TOKEN) is not working with project created since upgrade to gitlab v11.11.
parent 39a28f34
......@@ -284,7 +284,11 @@ module Gitlab
return unless password
# XXX-nxd: we also accept runners_token if enabled on projects
project = Project.with_builds_enabled.find_by(runners_token: password)
project = Project.find_by_runners_token(password)
unless project
# compatibility with projects created since gitlab 8.17
project = Project.with_builds_enabled.find_by(runners_token: password)
end
if project
Gitlab::Auth::Result.new(nil, project, :ci, build_authentication_abilities)
else
......
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