mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
feat(flag): Added feature_flag for superset security_views (#34023)
This commit is contained in:
@@ -87,6 +87,10 @@ EVENT_LOGGER = DBEventLogger()
|
||||
|
||||
SUPERSET_LOG_VIEW = True
|
||||
|
||||
# This config is used to enable/disable the folowing security menu items:
|
||||
# List Users, List Roles, List Groups
|
||||
SUPERSET_SECURITY_VIEW_MENU = True
|
||||
|
||||
BASE_DIR = str(files("superset"))
|
||||
if "SUPERSET_HOME" in os.environ:
|
||||
DATA_DIR = os.environ["SUPERSET_HOME"]
|
||||
|
||||
@@ -286,7 +286,9 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
|
||||
label=__("List Roles"),
|
||||
category="Security",
|
||||
category_label=__("Security"),
|
||||
icon="fa-lock",
|
||||
menu_cond=lambda: bool(
|
||||
appbuilder.app.config.get("SUPERSET_SECURITY_VIEW_MENU", True)
|
||||
),
|
||||
)
|
||||
|
||||
appbuilder.add_view(
|
||||
@@ -304,6 +306,9 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
|
||||
label=__("List Users"),
|
||||
category="Security",
|
||||
category_label=__("Security"),
|
||||
menu_cond=lambda: bool(
|
||||
appbuilder.app.config.get("SUPERSET_SECURITY_VIEW_MENU", True)
|
||||
),
|
||||
)
|
||||
|
||||
appbuilder.add_view(
|
||||
@@ -312,6 +317,9 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
|
||||
label=__("List Groups"),
|
||||
category="Security",
|
||||
category_label=__("Security"),
|
||||
menu_cond=lambda: bool(
|
||||
appbuilder.app.config.get("SUPERSET_SECURITY_VIEW_MENU", True)
|
||||
),
|
||||
)
|
||||
|
||||
appbuilder.add_view(
|
||||
|
||||
Reference in New Issue
Block a user