mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
Config programmatic roles in the config.py (#1664)
* Config programmatic roles in the config.py, * Add sql_lab.
This commit is contained in:
parent
1c429b27bc
commit
c07f0ab9c7
@ -244,6 +244,10 @@ RESULTS_BACKEND = None
|
||||
# dictionary.
|
||||
JINJA_CONTEXT_ADDONS = {}
|
||||
|
||||
# Roles that are controlled by the API / Superset and should not be changes
|
||||
# by humans.
|
||||
ROBOT_PERMISSION_ROLES = ['Public', 'Gamma', 'Alpha', 'Admin', 'sql_lab']
|
||||
|
||||
try:
|
||||
from superset_config import * # noqa
|
||||
print('Loaded your LOCAL configuration')
|
||||
|
@ -2561,7 +2561,7 @@ class DatasourceAccessRequest(Model, AuditMixinNullable):
|
||||
datasource_id = Column(Integer)
|
||||
datasource_type = Column(String(200))
|
||||
|
||||
ROLES_BLACKLIST = set(['Admin', 'Alpha', 'Gamma', 'Public'])
|
||||
ROLES_BLACKLIST = set(config.get('ROBOT_PERMISSION_ROLES', []))
|
||||
|
||||
@property
|
||||
def cls_model(self):
|
||||
|
Loading…
Reference in New Issue
Block a user