superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-superset] john-bodley commented on a change in pull request #9756: Fix SQL Lab schema permission checks
Date Wed, 06 May 2020 22:05:16 GMT

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


Mime
View raw message