X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ce2d2f5807822534756e52ac04bc272dd572d13d..fb72a4315bfcf64621d023a38d1544319aa3666c:/services/api/app/controllers/arvados/v1/keep_services_controller.rb diff --git a/services/api/app/controllers/arvados/v1/keep_services_controller.rb b/services/api/app/controllers/arvados/v1/keep_services_controller.rb index 5c0375fc18..c6e8894352 100644 --- a/services/api/app/controllers/arvados/v1/keep_services_controller.rb +++ b/services/api/app/controllers/arvados/v1/keep_services_controller.rb @@ -1,9 +1,25 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Arvados::V1::KeepServicesController < ApplicationController + skip_before_action :find_object_by_uuid, only: :accessible + skip_before_action :render_404_if_no_object, only: :accessible + skip_before_action :require_auth_scope, only: :accessible + def find_objects_for_index - # all users can list all keep disks - @objects = model_class.where('1=1') + # all users can list all keep services + @objects = KeepService.all super end + def accessible + if request.headers['X-External-Client'] == '1' + @objects = KeepService.where('service_type=?', 'proxy') + else + @objects = KeepService.where('service_type<>?', 'proxy') + end + render_list + end end