willbarrett commented on a change in pull request #14372:
URL: https://github.com/apache/superset/pull/14372#discussion_r621636386
##########
File path: superset/security/manager.py
##########
@@ -820,24 +834,7 @@ def _is_sql_lab_pvm(self, pvm: PermissionView) -> bool:
:param pvm: The FAB permission/view
:returns: Whether the FAB object is SQL Lab related
"""
-
- return (
- pvm.view_menu.name
- in {"SQL Lab", "SQL Editor", "Query Search", "Saved Queries"}
- or pvm.permission.name
- in {
- "can_sql_json",
- "can_csv",
- "can_search_queries",
- "can_sqllab_viz",
- "can_sqllab_table_viz",
- "can_sqllab",
- }
- or (
- pvm.view_menu.name in self.USER_MODEL_VIEWS
- and pvm.permission.name == "can_list"
- )
- )
+ return (pvm.permission.name, pvm.view_menu.name) in
self.SQLLAB_PERMISSION_VIEWS
Review comment:
It appears that this removes `self.USER_MODEL_VIEWS` `can_list`
permission - am I misreading?
--
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]