diff --git a/superset/security/manager.py b/superset/security/manager.py index 128d0dda8c1..0bbcf53180c 100644 --- a/superset/security/manager.py +++ b/superset/security/manager.py @@ -156,8 +156,6 @@ class SupersetSecurityManager( # pylint: disable=too-many-public-methods } GAMMA_READ_ONLY_MODEL_VIEWS = { - "Annotation", - "CssTemplate", "Dataset", "Datasource", } | READ_ONLY_MODEL_VIEWS @@ -180,19 +178,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 f741ec43153..90be0edd17b 100644 --- a/tests/integration_tests/security_tests.py +++ b/tests/integration_tests/security_tests.py @@ -1346,7 +1346,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 @@ -1514,8 +1513,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)