Load user capabilities from Pillar config and allow extensions to extend.
Default caps can be overridden using the USER_CAPABILITIES name in config_local.py. These can be extended by Pillar Extensions.
This commit is contained in:
@@ -160,3 +160,12 @@ TLS_CERT_FILE = requests.certs.where()
|
||||
|
||||
CELERY_BACKEND = 'redis://redis/1'
|
||||
CELERY_BROKER = 'amqp://guest:guest@rabbit//'
|
||||
|
||||
|
||||
# Mapping from user role to capabilities obtained by users with that role.
|
||||
USER_CAPABILITIES = defaultdict(**{
|
||||
'subscriber': {'subscriber', 'home-project'},
|
||||
'demo': {'subscriber', 'home-project'},
|
||||
'admin': {'subscriber', 'home-project', 'video-encoding', 'admin',
|
||||
'view-pending-nodes', 'edit-project-node-types'},
|
||||
}, default_factory=frozenset)
|
||||
|
Reference in New Issue
Block a user