-
Notifications
You must be signed in to change notification settings - Fork 14k
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: RBAC for can_export
for any resource
#17527
Conversation
107376f
to
6d32c10
Compare
Codecov Report
@@ Coverage Diff @@
## master #17527 +/- ##
==========================================
- Coverage 76.95% 76.81% -0.15%
==========================================
Files 1049 1049
Lines 56671 56671
Branches 7851 7851
==========================================
- Hits 43611 43529 -82
- Misses 12807 12889 +82
Partials 253 253
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
uri = f"api/v1/dataset/export/?q={prison.dumps(argument)}" | ||
|
||
self.login(username="gamma") | ||
rv = self.client.get(uri) | ||
assert rv.status_code == 404 | ||
assert rv.status_code == 401 |
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.
Can you improve this test, granting can_export
to gamma and testing that it can export after that?
I think you can do something like security_manager.add_permission_role("Gamma", "dataset_can_export")
here to add the permission.
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 with Beto's comment
can_export
for any resource
First of all thanks for this bug fix. |
@betodealmeida, @hughhhh , @AAfghahi, hello guys! I've checked this 2e29f36 in the master and it exist and it exist in this tag https://github.com/apache/superset/releases/tag/v0.19.0 Thanks in advance |
SUMMARY
Removing binding for
can_export
toread_{resource}
permissions. This will now allow us to have more control over who can be grantedcan_export
permissions.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION