mirror of
https://github.com/ceph/ceph
synced 2025-01-30 06:53:38 +00:00
Merge pull request #37041 from bk201/wip-47356
mgr/dashboard: fix security scopes of some NFS-Ganesha endpoints Reviewed-by: Laura Paduano <lpaduano@suse.com> Reviewed-by: Stephan Müller <smueller@suse.com> Reviewed-by: Volker Theile <vtheile@suse.com>
This commit is contained in:
commit
45d280c9cc
@ -233,7 +233,7 @@ class NFSGaneshaExports(RESTController):
|
||||
ganesha_conf.reload_daemons(export.daemons)
|
||||
|
||||
|
||||
@ApiController('/nfs-ganesha/daemon')
|
||||
@ApiController('/nfs-ganesha/daemon', Scope.NFS_GANESHA)
|
||||
@ControllerDoc(group="NFS-Ganesha")
|
||||
class NFSGaneshaService(RESTController):
|
||||
|
||||
@ -268,17 +268,20 @@ class NFSGaneshaService(RESTController):
|
||||
return result
|
||||
|
||||
|
||||
@UiApiController('/nfs-ganesha')
|
||||
@UiApiController('/nfs-ganesha', Scope.NFS_GANESHA)
|
||||
class NFSGaneshaUi(BaseController):
|
||||
@Endpoint('GET', '/cephx/clients')
|
||||
@ReadPermission
|
||||
def cephx_clients(self):
|
||||
return [client for client in CephX.list_clients()]
|
||||
|
||||
@Endpoint('GET', '/fsals')
|
||||
@ReadPermission
|
||||
def fsals(self):
|
||||
return Ganesha.fsals_available()
|
||||
|
||||
@Endpoint('GET', '/lsdir')
|
||||
@ReadPermission
|
||||
def lsdir(self, root_dir=None, depth=1): # pragma: no cover
|
||||
if root_dir is None:
|
||||
root_dir = "/"
|
||||
@ -299,13 +302,16 @@ class NFSGaneshaUi(BaseController):
|
||||
return {'paths': paths}
|
||||
|
||||
@Endpoint('GET', '/cephfs/filesystems')
|
||||
@ReadPermission
|
||||
def filesystems(self):
|
||||
return CephFS.list_filesystems()
|
||||
|
||||
@Endpoint('GET', '/rgw/buckets')
|
||||
@ReadPermission
|
||||
def buckets(self, user_id=None):
|
||||
return RgwClient.instance(user_id).get_buckets()
|
||||
|
||||
@Endpoint('GET', '/clusters')
|
||||
@ReadPermission
|
||||
def clusters(self):
|
||||
return Ganesha.get_ganesha_clusters()
|
||||
|
Loading…
Reference in New Issue
Block a user