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



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

Reply via email to