Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing TableSchemaView permissions for the sql_lab role #25451

Open
3 tasks done
cccs-tom opened this issue Sep 28, 2023 · 3 comments · May be fixed by #32340
Open
3 tasks done

Missing TableSchemaView permissions for the sql_lab role #25451

cccs-tom opened this issue Sep 28, 2023 · 3 comments · May be fixed by #32340

Comments

@cccs-tom
Copy link
Contributor

In Superset 2.0, the SQLLAB_BACKEND_PERSISTENCE feature flag was turned on by default. However, the permissions to create, modify and delete the TableSchemaView were not added to the sql_lab role by default. This causes error bubbles to appear when attempting to add or remove datasets to the left-hand pane (schema preview).

How to reproduce the bug

  1. Start Superset with a default configration
  2. Log in with a non-Admin, non-Alpha user who is assigned the sql_lab role
  3. Select a Database, Schema and Table in the left-hand pane
  4. An error bubble will appear
  5. Still on the left-hand pane, click the X icon to "Remove table preview"
  6. A different error will appear

Expected results

Persisting the table preview state to the backend should happen seamlessly, without reporting any errors. This should be true for any user who is assigned the sql_lab role, not just Admin and Alpha users.

Actual results

The UI seems to behave nominally - the table schema preview appears as expected, as does the sample data. But the error bubbles indicate that there was an error persisting the state to the backend (see screenshot).

Screenshots

image

Environment

(please complete the following information):

  • browser type and version: Reproduceable on several versions of Firefox and Chrome
  • superset version: 2.0+
  • python version: 3.8.16

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.
@rusackas
Copy link
Member

@cccs-tom do you know if this is still an issue, or are you still intending to open a PR? Otherwise, this issue is at risk of being closed since it's been quiet for 5 months, and we don't support 2.0 anymore.

@cccs-tom
Copy link
Contributor Author

@cccs-tom do you know if this is still an issue, or are you still intending to open a PR? Otherwise, this issue is at risk of being closed since it's been quiet for 5 months, and we don't support 2.0 anymore.

@rusackas My apologies, I got pulled off of Superset a while back and never made it back to this. I can try and check whether this has been fixed in 3.0+, I don't know off hand. Let me get back to you.

@cccs-tom
Copy link
Contributor Author

@rusackas I was just able to test this with @cccs-joel. We aren't set up to test with 4.0 RC1 at this time, but we were able to reproduce the bug with Superset 3.1.1.

@codenamelxl codenamelxl linked a pull request Feb 21, 2025 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants