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 2022/07/14 05:34:09 UTC

[GitHub] [superset] diegomedina248 commented on a diff in pull request #20285: fix(sql lab): SQL Lab access restrictions not applied to default schema

diegomedina248 commented on code in PR #20285:
URL: https://github.com/apache/superset/pull/20285#discussion_r920766505


##########
superset/security/manager.py:
##########
@@ -1054,19 +1054,24 @@ def raise_for_access(
             denied = set()
 
             for table_ in tables:
-                schema_perm = self.get_schema_perm(database, schema=table_.schema)
+                datasources = SqlaTable.query_datasources_by_name(
+                    self.get_session, database, table_.table
+                )
 
-                if not (schema_perm and self.can_access("schema_access", schema_perm)):
-                    datasources = SqlaTable.query_datasources_by_name(
-                        self.get_session, database, table_.table, schema=table_.schema
-                    )
+                # Access to any datasource is suffice.
+                for datasource_ in datasources:

Review Comment:
   Good catch! I amended the PR to account for it.



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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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