AmoghAtreya commented on code in PR #44968:
URL: https://github.com/apache/superset/pull/44968#discussion_r4179549749


##########
superset/sqllab/validators.py:
##########
@@ -33,5 +34,5 @@ def validate(
         security_manager.raise_for_access(
             query=query,
             template_params=template_params,
-            force_dataset_match=True,
+            force_dataset_match=requires_dataset_match(),

Review Comment:
   Thanks for catching that error @sadpandajoe! Just resolved it in the latest 
commit. The schema-rebinding check is no longer tied to dataset matching. With 
`SQLLAB_REQUIRE_DATASET_MATCH` off, a grant on `tenant_a` still allows `SELECT 
* FROM orders`, and `USE tenant_b; SELECT * FROM orders` is denied. The access 
check would otherwise qualify `orders` as `tenant_a.orders` while the shared 
cursor reads `tenant_b.orders`.



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