Add token to runner details output in API
This commit is contained in:
parent
dc32af9508
commit
553bac57d0
3 changed files with 3 additions and 1 deletions
|
@ -126,6 +126,7 @@ Example response:
|
|||
"path": "gitlab-org/gitlab-ce"
|
||||
}
|
||||
],
|
||||
"token": "205086a8e3b9a2b818ffac9b89d102",
|
||||
"revision": null,
|
||||
"tag_list": [
|
||||
"ruby",
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue