Find a runner using encrypted project / group tokens
This commit is contained in:
parent
f691b1fa08
commit
b32a99474b
|
@ -28,10 +28,10 @@ module API
|
||||||
if runner_registration_token_valid?
|
if runner_registration_token_valid?
|
||||||
# Create shared runner. Requires admin access
|
# Create shared runner. Requires admin access
|
||||||
attributes.merge(runner_type: :instance_type)
|
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
|
# Create a specific runner for the project
|
||||||
attributes.merge(runner_type: :project_type, projects: [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
|
# Create a specific runner for the group
|
||||||
attributes.merge(runner_type: :group_type, groups: [group])
|
attributes.merge(runner_type: :group_type, groups: [group])
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue