projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '18027-unmount-fuse'
[arvados.git]
/
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 43ce94d490533541ce548d934de15f72fc7a8467..c6e8894352f4f5f147c1d8e7f7d4c6d7db331aab 100644
(file)
--- a/
services/api/app/controllers/arvados/v1/keep_services_controller.rb
+++ b/
services/api/app/controllers/arvados/v1/keep_services_controller.rb
@@
-1,19
+1,25
@@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
class Arvados::V1::KeepServicesController < ApplicationController
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 services
def find_objects_for_index
# all users can list all keep services
- @objects =
model_class.where('1=1')
+ @objects =
KeepService.all
super
end
super
end
- def access
a
ble
- if request.headers['X-
Keep-Proxy-Required']
- @objects =
model_class
.where('service_type=?', 'proxy')
+ def access
i
ble
+ if request.headers['X-
External-Client'] == '1'
+ @objects =
KeepService
.where('service_type=?', 'proxy')
else
else
- @objects =
model_class.where('service_type=?', 'disk
')
+ @objects =
KeepService.where('service_type<>?', 'proxy
')
end
end
-
render_list
end
render_list
end
-
end
end