From: Peter Amstutz Date: Mon, 15 Oct 2018 20:53:40 +0000 (-0400) Subject: 14260: secret_mounts works with runtime_token X-Git-Tag: 1.3.0~70^2~4 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/1af0915450b8ae9f977d699da35b0ced2244bb7a 14260: secret_mounts works with runtime_token Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/services/api/app/controllers/arvados/v1/containers_controller.rb b/services/api/app/controllers/arvados/v1/containers_controller.rb index 064a829db9..98b987639b 100644 --- a/services/api/app/controllers/arvados/v1/containers_controller.rb +++ b/services/api/app/controllers/arvados/v1/containers_controller.rb @@ -69,9 +69,8 @@ class Arvados::V1::ContainersController < ApplicationController end def secret_mounts - if @object && - @object.auth_uuid && - @object.auth_uuid == Thread.current[:api_client_authorization].uuid + c = Container.for_current_token + if @object && c && @object.uuid == c.uuid send_json({"secret_mounts" => @object.secret_mounts}) else send_error("Token is not associated with this container.", status: 403)