X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fa8ab6f3576881b80e2edf4b9066ca15f46f05b4..de298e4e20a7ed07e16ed3cac87a18a66c0ceb83:/services/api/app/controllers/arvados/v1/keep_disks_controller.rb diff --git a/services/api/app/controllers/arvados/v1/keep_disks_controller.rb b/services/api/app/controllers/arvados/v1/keep_disks_controller.rb index 7db295dbb2..3d9191641e 100644 --- a/services/api/app/controllers/arvados/v1/keep_disks_controller.rb +++ b/services/api/app/controllers/arvados/v1/keep_disks_controller.rb @@ -12,15 +12,18 @@ class Arvados::V1::KeepDisksController < ApplicationController service_ssl_flag: true } end + def ping params[:service_host] ||= request.env['REMOTE_ADDR'] - if not @object.ping params - return render_not_found "object not found" + act_as_system_user do + if not @object.ping params + return render_not_found "object not found" + end + # Render the :superuser view (i.e., include the ping_secret) even + # if !current_user.is_admin. This is safe because @object.ping's + # success implies the ping_secret was already known by the client. + render json: @object.as_api_response(:superuser) end - # Render the :superuser view (i.e., include the ping_secret) even - # if !current_user.is_admin. This is safe because @object.ping's - # success implies the ping_secret was already known by the client. - render json: @object.as_api_response(:superuser) end def find_objects_for_index