alexandrusoare opened a new pull request, #45451: URL: https://github.com/apache/superset/pull/45451
### SUMMARY **`EXTRA_ACCESS_QUERY_EXCLUSIONS`** — `EXTRA_ACCESS_QUERY_FILTERS` is additive only: its conditions are OR'd into `ChartFilter` and `DashboardAccessFilter`, so a deployment can grant extra visibility but never withhold it. This adds the `AND NOT` counterpart, same callable shape, applied before the `is_admin()` / `can_access_all_datasources()` short-circuits so it holds for the principals the role paths stop narrowing. Embedded guests are left alone — their token already scopes them and fails closed. Since both filters are also the DAO base filters, one hook covers list views, exports and related-field lookups. **Report target filters** — `ReportTargetChartFilter` / `ReportTargetDashboardFilter` subclass the access filters and read their own exclusion keys. A scheduled report runs as whichever principal `ALERT_REPORTS_EXECUTORS` names, not as its author, so "may I read this" and "may I schedule a report on this" are different questions a deployment may answer differently. Only the key differs; the rest is inherited. **Explore requires dataset access** — `GetExploreCommand` authorised a saved chart with `raise_for_access(chart=slc)` and never checked the dataset. Explore is a query builder, so chart access alone shouldn't open it over a dataset the caller can't read. It now checks both; the SQL Lab `Query` authorship bypass is preserved in `_raise_for_datasource()`. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
