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
iv
gitlab-ce
Commits
553bac57
Commit
553bac57
authored
Feb 04, 2016
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add token to runner details output in API
parent
dc32af95
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletion
+3
-1
doc/api/runners.md
doc/api/runners.md
+1
-0
lib/api/entities.rb
lib/api/entities.rb
+1
-0
lib/api/runners.rb
lib/api/runners.rb
+1
-1
No files found.
doc/api/runners.md
View file @
553bac57
...
...
@@ -126,6 +126,7 @@ Example response:
"path"
:
"gitlab-org/gitlab-ce"
}
],
"token"
:
"205086a8e3b9a2b818ffac9b89d102"
,
"revision"
:
null
,
"tag_list"
:
[
"ruby"
,
...
...
lib/api/entities.rb
View file @
553bac57
...
...
@@ -387,6 +387,7 @@ module API
expose
:tag_list
expose
:version
,
:revision
,
:platform
,
:architecture
expose
:contacted_at
,
as: :last_contact
expose
:token
,
if:
lambda
{
|
runner
,
options
|
options
[
:user_is_admin
]
||
!
runner
.
is_shared?
}
expose
:projects
,
with:
Entities
::
RunnerProjectDetails
end
...
...
lib/api/runners.rb
View file @
553bac57
...
...
@@ -33,7 +33,7 @@ module API
runner
=
get_runner
(
params
[
:id
])
can_show_runner?
(
runner
)
unless
current_user
.
is_admin?
present
runner
,
with:
Entities
::
RunnerDetails
present
runner
,
with:
Entities
::
RunnerDetails
,
user_is_admin:
current_user
.
is_admin?
end
# Update runner's details
...
...
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