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(dashboard): show correct roles for dashboard access dropdown #21549

Merged
merged 5 commits into from
Sep 26, 2022

Conversation

mayurnewase
Copy link
Contributor

@mayurnewase mayurnewase commented Sep 22, 2022

SUMMARY

Fixes: #21538
regression from #20837

TESTING INSTRUCTIONS

Enable DASHBOARD_RBAC feature flag
Add 1 role
Add 1 active and 1 inactive user
Create 1 dashboard
Click on edit dashboard from actions
Check owners dropdown shows only active users
Check roles dropdown shows all roles available

ADDITIONAL INFORMATION

  • Has associated issue: Unable to see roles in drop down in edit dashboard #21538
  • Required feature flags: DASHBOARD_RBAC
  • 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

@mayurnewase mayurnewase changed the title fix: show roles in dashboard access dropdown fix(dashboard): show roles in dashboard access dropdown Sep 24, 2022
@codecov
Copy link

codecov bot commented Sep 24, 2022

Codecov Report

Merging #21549 (8fa7301) into master (fb835d1) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #21549      +/-   ##
==========================================
- Coverage   66.68%   66.65%   -0.03%     
==========================================
  Files        1793     1793              
  Lines       68538    68627      +89     
  Branches     7282     7309      +27     
==========================================
+ Hits        45702    45745      +43     
- Misses      20974    21015      +41     
- Partials     1862     1867       +5     
Flag Coverage Δ
javascript 52.85% <100.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
...src/dashboard/components/PropertiesModal/index.tsx 67.06% <100.00%> (+5.98%) ⬆️
...iews/CRUD/data/dataset/AddDataset/Footer/index.tsx 33.33% <0.00%> (-66.67%) ⬇️
.../plugin-chart-pivot-table/src/plugin/buildQuery.ts 42.85% <0.00%> (-12.70%) ⬇️
...nd/plugins/plugin-chart-table/src/controlPanel.tsx 53.12% <0.00%> (-9.84%) ⬇️
...ntend/plugins/plugin-chart-table/src/buildQuery.ts 56.25% <0.00%> (-4.77%) ⬇️
...ugin-chart-pivot-table/src/plugin/controlPanel.tsx 4.16% <0.00%> (-2.98%) ⬇️
...et-ui-chart-controls/src/shared-controls/index.tsx 57.14% <0.00%> (-2.48%) ⬇️
...frontend/src/components/DatabaseSelector/index.tsx 93.93% <0.00%> (-1.30%) ⬇️
...set-frontend/src/views/CRUD/data/dataset/styles.ts 100.00% <0.00%> (ø)
...et-frontend/src/components/TableSelector/index.tsx 80.00% <0.00%> (ø)
... and 7 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mayurnewase mayurnewase requested review from michael-s-molina, zhaoyongjie and zephyring and removed request for zephyring September 24, 2022 13:11
@mayurnewase mayurnewase changed the title fix(dashboard): show roles in dashboard access dropdown fix(dashboard): show correct roles for dashboard access dropdown Sep 25, 2022
@michael-s-molina
Copy link
Member

@mayurnewase @zephyring #20837 also modified the owners in src/components/Datasource/DatasourceEditor. Shouldn't the same fix be applied there?

@mayurnewase
Copy link
Contributor Author

mayurnewase commented Sep 26, 2022

@michael-s-molina datasource editor only has owner selection, so it correctly filters out inactive users.
here loadAccessOptionsis shared between users and roles which had to be updated.
I don't think we need any change there.

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM

@michael-s-molina michael-s-molina merged commit 73429c6 into apache:master Sep 26, 2022
@mayurnewase
Copy link
Contributor Author

thanks.

@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 size/L 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to see roles in drop down in edit dashboard
6 participants