Commit 553bac57 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Add token to runner details output in API

parent dc32af95
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment