You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/01/29 22:02:21 UTC
[GitHub] [incubator-superset] willbarrett commented on a change in pull
request #9046: [query] deprecate can_only_access_owned_queries
willbarrett commented on a change in pull request #9046: [query] deprecate can_only_access_owned_queries
URL: https://github.com/apache/incubator-superset/pull/9046#discussion_r372655476
##########
File path: superset/security/manager.py
##########
@@ -177,15 +177,13 @@ def can_access(self, permission_name: str, view_name: str) -> bool:
return self.is_item_public(permission_name, view_name)
return self._has_view_access(user, permission_name, view_name)
- def can_only_access_owned_queries(self) -> bool:
+ def can_access_all_queries(self) -> bool:
"""
- Return True if the user can only access owned queries, False otherwise.
+ Return True if the user can access all queries, False otherwise.
- :returns: Whether the use can only access owned queries
+ :returns: Whether the use can access all queries
"""
- return self.can_access(
- "can_only_access_owned_queries", "can_only_access_owned_queries"
- )
+ return self.can_access("can_access_all_queries", "can_access_all_queries")
Review comment:
The naming of this permission is inconsistent with the naming of other similar permissions. If we wished to bring this in line with `all_datasource_access` and `all_database_access` I would recommend altering this name to `all_query_access`. `can_access_` in the permission name is redundant.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org