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

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