Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-20 17:25:24 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-20 17:25:24 +0300
commitb32a99474b3c9e4e5a7f93116491c259418ff3bf (patch)
tree6ef52efda4e48ea450f04b0397ac35faac18177e /lib/api/runner.rb
parentf691b1fa08ac88c9bb4af819ffb49a9bf68df173 (diff)
Find a runner using encrypted project / group tokens
Diffstat (limited to 'lib/api/runner.rb')
-rw-r--r--lib/api/runner.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb
index 2f15f3a7d76..af205dc8a61 100644
--- a/lib/api/runner.rb
+++ b/lib/api/runner.rb
@@ -28,10 +28,10 @@ module API
if runner_registration_token_valid?
# Create shared runner. Requires admin access
attributes.merge(runner_type: :instance_type)
- elsif project = Project.find_by(runners_token: params[:token])
+ elsif project = Project.find_by_runners_token(params[:token])
# Create a specific runner for the project
attributes.merge(runner_type: :project_type, projects: [project])
- elsif group = Group.find_by(runners_token: params[:token])
+ elsif group = Group.find_by_runners_token(params[:token])
# Create a specific runner for the group
attributes.merge(runner_type: :group_type, groups: [group])
else