You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SQL Lab "Create chart" broken for non-admin users #42389
This looks related to the authorization hardening introduced in PR #40409, which tightened SQL Lab access so that operations now require a matching Superset dataset-level permission — database_access or schema_access alone is no longer sufficient for Gamma-style users.
Here's what's happening in the "Create chart" flow:
When you click Create chart, the frontend calls /api/v1/dataset/get_or_create/ to create a dataset from the CTAS/CVAS result [1].
The CreateDatasetCommand validates access via raise_for_access(database=database, sql=sql, ...)[2]. For a Gamma user with only database_access (no all_datasource_access), this check fails because the hardened authorization now demands explicit datasource-level permission for the newly created/referenced table [3].
Because the backend rejects the request, no valid dataset_id is returned, so the frontend navigation to Explore fails with the "Missing URL parameters" error.
Workarounds:
Grant all_datasource_access to the role (which you've noted you want to avoid).
Grant schema-level access (schema_access) on the schema where CTAS tables are created (configured via CTAS_SCHEMA_NAME_FUNC in superset_config.py). This should satisfy raise_for_access at the schema level.
Ensure the user is set as owner of any datasets created, since ownership bypasses the datasource permission check [4].
This may be an unintended regression from the authorization hardening wave (PRs #40409, #38952, #40497) — the "Create chart" flow inherently creates new datasets that the user wouldn't have pre-existing permissions for. You may want to check whether the dataset created via get_or_create properly assigns the creating user as owner, which would allow the subsequent Explore access to succeed.
Activity
dosubot commentedon Jul 24, 2026
This looks related to the authorization hardening introduced in PR #40409, which tightened SQL Lab access so that operations now require a matching Superset dataset-level permission —
database_accessorschema_accessalone is no longer sufficient for Gamma-style users.Here's what's happening in the "Create chart" flow:
/api/v1/dataset/get_or_create/to create a dataset from the CTAS/CVAS result [1].CreateDatasetCommandvalidates access viaraise_for_access(database=database, sql=sql, ...)[2]. For a Gamma user with onlydatabase_access(noall_datasource_access), this check fails because the hardened authorization now demands explicit datasource-level permission for the newly created/referenced table [3].dataset_idis returned, so the frontend navigation to Explore fails with the "Missing URL parameters" error.Workarounds:
all_datasource_accessto the role (which you've noted you want to avoid).schema_access) on the schema where CTAS tables are created (configured viaCTAS_SCHEMA_NAME_FUNCinsuperset_config.py). This should satisfyraise_for_accessat the schema level.This may be an unintended regression from the authorization hardening wave (PRs #40409, #38952, #40497) — the "Create chart" flow inherently creates new datasets that the user wouldn't have pre-existing permissions for. You may want to check whether the dataset created via
get_or_createproperly assigns the creating user as owner, which would allow the subsequent Explore access to succeed.To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.
durgaprasadml commentedon Jul 27, 2026
I've opened a PR with a proposed fix for this issue:
#42479 –
fix(sqllab): allow SQL Lab query owners to create charts without all_datasource_accessThe fix preserves the existing RBAC behavior while allowing authorized SQL Lab users to create charts from their own queries.
Feedback is welcome. Thanks!
rusackas commentedon Jul 28, 2026
Thanks for opening the PR... will review.