X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/20a69e126c68236a3c73daab101e351346f8bfaf..dc021c3b57dcdebe464c148d55f9990a74e8246b:/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 865f9c942f..c6e8894352 100644 --- a/services/api/app/controllers/arvados/v1/keep_services_controller.rb +++ b/services/api/app/controllers/arvados/v1/keep_services_controller.rb @@ -10,29 +10,16 @@ class Arvados::V1::KeepServicesController < ApplicationController def find_objects_for_index # all users can list all keep services - @objects = from_config_or_db + @objects = KeepService.all super end def accessible if request.headers['X-External-Client'] == '1' - @objects = from_config_or_db.where('service_type=?', 'proxy') + @objects = KeepService.where('service_type=?', 'proxy') else - @objects = from_config_or_db.where('service_type<>?', 'proxy') + @objects = KeepService.where('service_type<>?', 'proxy') end render_list end - - private - - # return the set of keep services from the database (if this is an - # older installation or test system where entries have been added - # manually) or, preferably, the cluster config file. - def from_config_or_db - if KeepService.all.count == 0 - KeepService.from_config - else - KeepService.all - end - end end