sha174n opened a new pull request, #43999: URL: https://github.com/apache/superset/pull/43999
### SUMMARY The dataset import path validated access to the dataset object (`raise_for_access(datasource=...)`) but did not apply the SQL/table-level access check that the create and update dataset commands run for virtual datasets. This adds `raise_for_access(sql=...)` for virtual datasets in `import_dataset`, matching `CreateDatasetCommand`/`UpdateDatasetCommand`, and fails closed if the SQL cannot be parsed. Physical-dataset imports are unchanged. ### TESTING INSTRUCTIONS `pytest tests/unit_tests/datasets/commands/importers/v1/import_test.py`. Adds a regression test asserting that importing a virtual dataset whose SQL references a table the caller cannot access raises `DatasetAccessDeniedError`. ### ADDITIONAL INFORMATION - [ ] Has associated issue - [x] Required feature flags: n/a - [ ] Changes UI - [ ] Includes DB Migration - [x] Runtime consequences 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
