Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
b32a9947
Commit
b32a9947
authored
Nov 20, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Find a runner using encrypted project / group tokens
parent
f691b1fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/api/runner.rb
lib/api/runner.rb
+2
-2
No files found.
lib/api/runner.rb
View file @
b32a9947
...
@@ -28,10 +28,10 @@ module API
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment