joezeon opened a new issue, #42389:
URL: https://github.com/apache/superset/issues/42389
### Bug description
### Steps to reproduce
1. Create a user with the `Gamma` and `sql_lab` roles (or any custom
non-admin role that has SQL Lab access to a database but no
`all_datasource_access`).
2. Grant the role `database_access` on the target database so the user can
run queries in SQL Lab.
3. Log in as that user, open SQL Lab, run any query. The results panel
loads normally.
4. Click the **Create chart** button in the results toolbar.
5. Observe the errors below.
### Actual result
Two errors surface:
- Backend (from `superset/security/manager.py:837` via `raise_for_access`):
This endpoint requires the datasource <n>, database or
all_datasource_access permission
- Frontend (from
`superset-frontend/src/explore/components/controls/DatasourceControl/index.tsx:543`):
Missing URL parameters
The URL is missing the dataset_id or slice_id parameters.
### Screenshots/recordings
_No response_
### Superset version
6.1.0
### Python version
3.11
### Node version
Not applicable
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to
my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug
report.
- [ ] I have checked Superset's logs for errors and if I found a relevant
Python stacktrace, I included it here as text in the "additional context"
section.
--
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]