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/05/06 22:05:16 UTC

[GitHub] [incubator-superset] john-bodley commented on a change in pull request #9756: Fix SQL Lab schema permission checks

john-bodley commented on a change in pull request #9756:
URL: https://github.com/apache/incubator-superset/pull/9756#discussion_r421118032



##########
File path: superset/security/manager.py
##########
@@ -356,13 +356,12 @@ def rejected_tables(
         :param schema: The SQL database schema
         :returns: The rejected tables
         """
-
         query = sql_parse.ParsedQuery(sql)
 
         return {
             table
             for table in query.tables
-            if not self.can_access_datasource(database, table, schema)
+            if not self.can_access_datasource(database, table, table.schema or schema)

Review comment:
       I wonder if this line should be reverted, i.e., the `schema` is the fallback schema per the docstring and `can_access_datasource` should be changed to be, 
   
   ```
   schema_perm = self.get_schema_perm(database, table.schema or schema)
   ```




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org