diff --git a/superset/security/manager.py b/superset/security/manager.py index 6f3a4b90bf0..391704c41be 100644 --- a/superset/security/manager.py +++ b/superset/security/manager.py @@ -167,8 +167,6 @@ class SupersetSecurityManager( # pylint: disable=too-many-public-methods } GAMMA_READ_ONLY_MODEL_VIEWS = { - "Annotation", - "CssTemplate", "Dataset", "Datasource", } | READ_ONLY_MODEL_VIEWS @@ -191,19 +189,21 @@ class SupersetSecurityManager( # pylint: disable=too-many-public-methods } | USER_MODEL_VIEWS ALPHA_ONLY_VIEW_MENUS = { - "Manage", - "CSS Templates", - "Annotation Layers", - "Queries", - "Import dashboards", - "Upload a CSV", - "ReportSchedule", "Alerts & Report", - "TableSchemaView", - "CsvToDatabaseView", + "Annotation Layers", + "Annotation", + "CSS Templates", "ColumnarToDatabaseView", + "CssTemplate", + "CsvToDatabaseView", "ExcelToDatabaseView", + "Import dashboards", "ImportExportRestApi", + "Manage", + "Queries", + "ReportSchedule", + "TableSchemaView", + "Upload a CSV", } ADMIN_ONLY_PERMISSIONS = { diff --git a/tests/integration_tests/security_tests.py b/tests/integration_tests/security_tests.py index c65f5a6dd88..55fc1f2dad3 100644 --- a/tests/integration_tests/security_tests.py +++ b/tests/integration_tests/security_tests.py @@ -1345,7 +1345,6 @@ class TestRolePermission(SupersetTestCase): self.assert_cannot_menu("Alerts & Report", perm_set) def assert_can_gamma(self, perm_set): - self.assert_can_read("CssTemplate", perm_set) self.assert_can_read("Dataset", perm_set) # make sure that user can create slices and dashboards @@ -1552,8 +1551,6 @@ class TestRolePermission(SupersetTestCase): # make sure that user can create slices and dashboards self.assert_can_all("Dashboard", gamma_perm_set) self.assert_can_read("Dataset", gamma_perm_set) - self.assert_can_read("Annotation", gamma_perm_set) - self.assert_can_read("CssTemplate", gamma_perm_set) # make sure that user can create slices and dashboards self.assert_can_all("Chart", gamma_perm_set)