mikebridge opened a new pull request, #44929:
URL: https://github.com/apache/superset/pull/44929
### SUMMARY
`GET /api/v1/dashboard/export/` returned a 500 when one of the dashboard's
charts, or a chart's dataset, was outside the caller's access. The nested chart
and dataset exports report an access-filtered object as not found, and the
dashboard endpoint caught only its own not-found error.
The endpoint now maps those to the same bare 404 (`{"message": "Not
found"}`) that the chart and dataset export endpoints return (see #44900 for
the chart case). The response does not reveal whether the hidden object exists,
or its name or id, and no partial bundle is sent.
The export still fails as a whole when one member is inaccessible, as it
already did for a missing dashboard. Exporting the rest and skipping the hidden
member would mean also cleaning the dashboard's position and filter references
to it, so that is left as a possible separate feature.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A (API error mapping).
### TESTING INSTRUCTIONS
- `pytest tests/unit_tests/dashboards/test_export_api.py`: the new test
fails on master with a 500 for both a hidden chart and a hidden dataset, and
passes here.
- Limit of that test: it replaces the export command with one that raises,
so it proves the error mapping, not the access filtering itself. An integration
test with a dashboard viewer who lacks a nested dataset grant would cover the
real path.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 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]