]>
git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/security.py
1 # -*- coding: utf-8 -*-
8 List of Dashboard Security Scopes.
9 If you need another security scope, please add it here.
13 CONFIG_OPT
= "config-opt"
17 RBD_IMAGE
= "rbd-image"
19 RBD_MIRRORING
= "rbd-mirroring"
25 PROMETHEUS
= "prometheus"
27 DASHBOARD_SETTINGS
= "dashboard-settings"
28 NFS_GANESHA
= "nfs-ganesha"
32 return [val
for scope
, val
in
33 inspect
.getmembers(cls
,
34 lambda memb
: not inspect
.isroutine(memb
))
35 if not scope
.startswith('_')]
38 def valid_scope(cls
, scope_name
):
39 return scope_name
in cls
.all_scopes()
42 class Permission(object):
44 Scope permissions types
52 def all_permissions(cls
):
53 return [val
for perm
, val
in
54 inspect
.getmembers(cls
,
55 lambda memb
: not inspect
.isroutine(memb
))
56 if not perm
.startswith('_')]
59 def valid_permission(cls
, perm_name
):
60 return perm_name
in cls
.all_permissions()