-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
feat: add hooks on set_perm for new data permissions #20600
feat: add hooks on set_perm for new data permissions #20600
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20600 +/- ##
==========================================
- Coverage 66.79% 66.63% -0.17%
==========================================
Files 1754 1754
Lines 65565 65572 +7
Branches 6935 6935
==========================================
- Hits 43793 43692 -101
- Misses 20017 20125 +108
Partials 1755 1755
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Looks good! If I understand correctly we're not calling these anywhere in Superset, but custom security managers will use them?
yes, exactly that |
* feat: add hooks on set_perm for new data permissions * fix lint (cherry picked from commit f38dd1d)
* feat: add hooks on set_perm for new data permissions * fix lint
* feat: add hooks on set_perm for new data permissions * fix lint (cherry picked from commit f38dd1d)
* feat: add hooks on set_perm for new data permissions * fix lint (cherry picked from commit f38dd1d)
* feat: add hooks on set_perm for new data permissions * fix lint
SUMMARY
Adds hooks for
ViewMenu
,Permission
andPermissionView
forafter_insert
events.Since
set_perm
can't use the current SQLAlchemy session (doc: https://docs.sqlalchemy.org/en/14/orm/session_events.html#mapper-level-events)ADDITIONAL INFORMATION