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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to