]>
git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/security.py
1 # -*- coding: utf-8 -*-
2 from __future__
import absolute_import
9 List of Dashboard Security Scopes.
10 If you need another security scope, please add it here.
14 CONFIG_OPT
= "config-opt"
18 RBD_IMAGE
= "rbd-image"
20 RBD_MIRRORING
= "rbd-mirroring"
26 PROMETHEUS
= "prometheus"
28 DASHBOARD_SETTINGS
= "dashboard-settings"
29 NFS_GANESHA
= "nfs-ganesha"
33 return [val
for scope
, val
in
34 inspect
.getmembers(cls
,
35 lambda memb
: not inspect
.isroutine(memb
))
36 if not scope
.startswith('_')]
39 def valid_scope(cls
, scope_name
):
40 return scope_name
in cls
.all_scopes()
43 class Permission(object):
45 Scope permissions types
53 def all_permissions(cls
):
54 return [val
for perm
, val
in
55 inspect
.getmembers(cls
,
56 lambda memb
: not inspect
.isroutine(memb
))
57 if not perm
.startswith('_')]
60 def valid_permission(cls
, perm_name
):
61 return perm_name
in cls
.all_permissions()