-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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): incorrect perm for users with multiple roles #14148
Conversation
@@ -122,7 +122,7 @@ | |||
"regenerator-runtime": "^0.13.5", | |||
"rison": "^0.1.1", | |||
"shortid": "^2.2.6", | |||
"urijs": "^1.19.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lockfile updated from npm ci
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for fixing. I didn't even realize multiple roles were possible!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for tests! I did not know multiple roles were possible as well!
Codecov Report
@@ Coverage Diff @@
## master #14148 +/- ##
==========================================
+ Coverage 79.70% 79.92% +0.21%
==========================================
Files 945 943 -2
Lines 47975 47757 -218
Branches 6082 6015 -67
==========================================
- Hits 38240 38169 -71
+ Misses 9614 9469 -145
+ Partials 121 119 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
SUMMARY
This fixes a bug where dashboard permission check is incorrect when users have multiple roles.
The resulted some users not seeing "View chart in Explore" link in dashboards.
cc @suddjian @pkdotson
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before
Some links in chart menu are missing if the user has multiple roles and the last role does not contain permission for
[Superset, can_explore]
.After
TEST PLAN
To reproduce the bug, add a new role (e.g.
sql_lab
) to the logged in user.Added unit tests.
ADDITIONAL INFORMATION