feat(security): Add config-based extension hooks for permission overr…#40707
Draft
alexandrusoare wants to merge 6 commits into
Draft
feat(security): Add config-based extension hooks for permission overr…#40707alexandrusoare wants to merge 6 commits into
alexandrusoare wants to merge 6 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #40707 +/- ##
==========================================
- Coverage 64.03% 64.03% -0.01%
==========================================
Files 2663 2664 +1
Lines 143619 143835 +216
Branches 33030 33081 +51
==========================================
+ Hits 91973 92111 +138
- Misses 50044 50106 +62
- Partials 1602 1618 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…andrusoare/feat/permission-extension-hooks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
Adds config-based extension hooks to Superset's permission system, following the existing
EXTRA_DYNAMIC_QUERY_FILTERSpattern. These hooks allow deployments to inject custom permission logic without modifying core files.All hooks are no-ops by default — zero behavioral change without explicit configuration.
Hooks added:
EXTRA_ACCESS_QUERY_FILTERS["charts"]ChartFilter.apply()EXTRA_ACCESS_QUERY_FILTERS["dashboards"]DashboardAccessFilter.apply()EXTRA_RAISE_FOR_ACCESS_BYPASSraise_for_access()EXTRA_OWNERSHIP_CHECKSraise_for_ownership()EXTRA_OWNER_AUTO_ADD_SKIPpopulate_owner_list()EXTRA_OWNERS_RESOLVERSlice.data,ChartRestApi.get(),DashboardRestApi.get()BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION