feat(rbac): add customizable related filters#22526
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #22526 +/- ##
==========================================
- Coverage 66.91% 65.41% -1.51%
==========================================
Files 1851 1851
Lines 70715 70730 +15
Branches 7766 7766
==========================================
- Hits 47320 46266 -1054
- Misses 21373 22442 +1069
Partials 2022 2022
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Contributor
|
LGTM! Thanks for this PR |
dpgaspar
approved these changes
Jan 5, 2023
9 tasks
9 tasks
9 tasks
qfcwell
pushed a commit
to qfcwell/superset
that referenced
this pull request
May 12, 2026
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
This is a continuation of #21515, which made it possible to exclude specific users from dropdown lists, to make it possible to add arbitrary filter conditions to both the user and role dropdowns. The primary reason for this is to be able to restrict the available roles in the Dashboard role dropdown when using
DASHBOARD_RBAC, as users may unintentionally give too wide access to dashboards by sharing with a too generic role. Similarly, there may be a need to restrict to whom a user should be able to give ownership of an object.To demonstrate, by adding the following to
superset_config.py, the owners dropdown now only contains the entryadmin, and the roles dropdown only contains entries starting with the letter "A":Now users only displays "Admin":
Similarly roles only contains "Admin" and "Alpha":
TESTING INSTRUCTIONS
superset_config.pyADDITIONAL INFORMATION