Skip to content

Cannot create data source from SQL Lab to Chart (Create chart button) if user does not have "all datasource access all datasource access" #39296

Closed

Description

@FormShareDev

Bug description

The bug is that if users access only the specific schemas and data sources they have created, the "all datasource access all datasource access" option must be unchecked. However, if it is unchecked, you cannot jump from SQL Lab to create a chart (Create chart button) because the data source created by that jump is not yet accessible to the user.

The only way is SQL Lab -> Save dataset -> Create chart

Screenshots/recordings

No response

Superset version

6.0.0

Python version

3.11

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • 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.

Activity

  1. dosubot commented on Apr 11, 2026

    @dosubot

    Hi @FormShareDev! I'm Dosu and I’m helping the superset team.

    This is a confirmed permission gap in the "Create chart" flow from SQL Lab. The root cause is that the "Create chart" button doesn't create a persistent dataset — it creates a temporary cached reference to the query [1]. Because no persistent dataset is created, there's no ownership assignment, and the permission system requires either all_datasource_access or specific datasource permissions to proceed into the Explore view [2].

    In contrast, the "Save dataset" flow calls populate_owners() which automatically assigns the current user as the dataset owner [3], granting them access even without all_datasource_access. That's why the SQL Lab → Save dataset → Create chart workaround works.

    There have been several related issues reported, including RLS bypass when going from SQL Lab to chart [4] and users unable to see their own created datasets [5]. Multiple PRs merged in March–April 2026 address various aspects of this permission gap:

    • PR #38647 — tightened datasource access validation [6]
    • PR #38952 — added authorization checks for SQL Lab query results [7]
    • PR #37185 — added dataset validation for chart tools [8]
    • PR #38845 — centralized data-level permission checks [9]

    These fixes are very recent and may not yet be in a stable release. For now, SQL Lab → Save dataset → Create chart remains the recommended workaround.

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about superset with Dosu Add Dosu to your team

  2. rusackas commented on Jul 29, 2026

    @rusackas
    Member

    A few PRs landed since that touched pieces of this permission gap (#38647, #38952, #37185). Worth confirming this specific case, unchecked "all datasource access" blocking the SQL Lab to chart jump, still reproduces on current master before we decide what's left to do here. I'll open a PR with some tests and see how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions