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: enable admin to edit dataset in explore #20613

Merged
merged 3 commits into from
Jul 8, 2022

Conversation

pkdotson
Copy link
Member

@pkdotson pkdotson commented Jul 6, 2022

SUMMARY

This pr fixes an issue where the dataset is not editable if user is admin in explore.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

after

Screen.Recording.2022-07-05.at.8.18.10.PM.mov

TESTING INSTRUCTIONS

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

@pull-request-size pull-request-size bot added size/S and removed size/XS labels Jul 6, 2022
@codecov
Copy link

codecov bot commented Jul 6, 2022

Codecov Report

Merging #20613 (ff90621) into master (4137fe0) will increase coverage by 0.01%.
The diff coverage is 74.19%.

❗ Current head ff90621 differs from pull request most recent head 74ebd86. Consider uploading reports for the commit 74ebd86 to get more accurate results

@@            Coverage Diff             @@
##           master   #20613      +/-   ##
==========================================
+ Coverage   66.79%   66.81%   +0.01%     
==========================================
  Files        1754     1752       -2     
  Lines       65566    65635      +69     
  Branches     6935     6940       +5     
==========================================
+ Hits        43798    43857      +59     
- Misses      20013    20016       +3     
- Partials     1755     1762       +7     
Flag Coverage Δ
javascript 51.83% <43.03%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...frontend/src/components/DatabaseSelector/index.tsx 88.88% <ø> (ø)
...frontend/src/components/ImportModal/ErrorAlert.tsx 33.33% <ø> (ø)
superset-frontend/src/explore/ExplorePage.tsx 0.00% <0.00%> (ø)
...t-frontend/src/explore/actions/saveModalActions.js 56.52% <0.00%> (-2.57%) ⬇️
.../explore/components/ExploreViewContainer/index.jsx 52.84% <ø> (ø)
superset-frontend/src/preamble.ts 0.00% <0.00%> (ø)
superset-frontend/src/utils/getDatasourceUid.ts 50.00% <0.00%> (-50.00%) ⬇️
superset-frontend/src/utils/localStorageHelpers.ts 90.00% <ø> (ø)
superset-frontend/src/views/App.tsx 0.00% <0.00%> (ø)
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 58.77% <ø> (ø)
... and 37 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4137fe0...74ebd86. Read the comment docs.

@@ -139,6 +139,27 @@ test('Click on Edit dataset', async () => {
).toBeInTheDocument();
});

test('Edit dataset should be disabled when user is not admin', async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Copy link
Member

@eschutho eschutho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pkdotson!

@pkdotson pkdotson merged commit e1a918f into apache:master Jul 8, 2022
jinghua-qa pushed a commit to preset-io/superset that referenced this pull request Jul 8, 2022
* add conditional

* add test

* fix lint

(cherry picked from commit e1a918f)
jinghua-qa pushed a commit to preset-io/superset that referenced this pull request Jul 12, 2022
* add conditional

* add test

* fix lint

(cherry picked from commit e1a918f)
jinghua-qa pushed a commit to preset-io/superset that referenced this pull request Jul 12, 2022
* add conditional

* add test

* fix lint

(cherry picked from commit e1a918f)
akshatsri pushed a commit to charan1314/superset that referenced this pull request Jul 19, 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 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:2022.27 preset-io size/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants