bkyryliuk commented on a change in pull request #10241:
URL:
https://github.com/apache/incubator-superset/pull/10241#discussion_r456632603
##########
File path: superset/security/manager.py
##########
@@ -139,7 +138,13 @@ class SupersetSecurityManager( # pylint:
disable=too-many-public-methods
"RowLevelSecurityFiltersModelView",
} | USER_MODEL_VIEWS
- ALPHA_ONLY_VIEW_MENUS = {"Upload a CSV"}
+ ALPHA_ONLY_VIEW_MENUS = {
Review comment:
we do the same in the permission sync script.
1 suggestion, maybe add a unit test
example:
```
def test_sync_creator_role(setup):
# type: (Any) -> None
session = db.create_scoped_session()
sync_creator_role(session)
creator_role =
session.query(ab_models.Role).filter_by(name="Creator").one()
assert set([p.view_menu.name for p in creator_role.permissions]) == {
"TableModelView",
"TableColumnInlineView",
"SqlMetricInlineView",
# TODO(bogdankyryliuk): share the same config with production.
# "DashboardEmailScheduleView",
# "SliceEmailScheduleView",
"Manage",
"AnnotationModelView",
"AnnotationLayerModelView",
"all_query_access",
"CsvToDatabaseView",
"Datasource",
"Upload a CSV",
}
assert set([p.permission.name for p in creator_role.permissions]) == {
"all_query_access",
"can_add",
"can_save",
"can_delete",
"can_edit",
"can_external_metadata",
"can_get",
"can_list",
"can_mulexport",
"can_show",
"can_this_form_get",
"can_this_form_post",
"muldelete",
"refresh",
"yaml_export",
"menu_access",
}```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]