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

fix: Change dataset name affect data access role set to this dataset #20574

Conversation

diegomedina248
Copy link
Contributor

SUMMARY

When the user changes the name of a virtual dataset, any user that had specific access to said dataset will no longer be able to access it.

The issue is because the set_perm function is changing the table name but not the permission and view_model, thus, a new permission/view is created and the users keep pointing to the old one.

This PR ensures that, on name change, those records are also updated.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screen.Recording.2022-06-30.at.18.18.17.mov

After:

new.mov

TESTING INSTRUCTIONS

  1. Create a virtual dataset
  2. Create a new role and grant access to the created dataset
  3. Create a new user and assign the Gamma role, and the role created in 2.
  4. Access the dataset list with that user
  5. With the admin account, change the dataset table name
  6. Ensure the user created in 3 can still see the dataset, now with the new name

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@diegomedina248 diegomedina248 force-pushed the fix/change-dataset-name-affect-data-access-role branch 2 times, most recently from 56119f9 to 086cd55 Compare June 30, 2022 22:15
@diegomedina248 diegomedina248 force-pushed the fix/change-dataset-name-affect-data-access-role branch from 086cd55 to 2a7f159 Compare June 30, 2022 22:21
@rusackas rusackas requested a review from eschutho July 13, 2022 18:56
@rusackas rusackas merged commit 9291ad5 into apache:master Aug 2, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels Preset-Patch size/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants