Repository navigation
fix(rls): apply Public role RLS rules to anonymous users - #45333
Conversation
CodeAnt PR Risk: Low Risk
Assessed commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #45333 +/- ##
=======================================
Coverage 83.45% 83.45%
=======================================
Files 3045 3045
Lines 199194 199199 +5
Branches 46455 46457 +2
=======================================
+ Hits 166241 166246 +5
Misses 29727 29727
Partials 3226 3226
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:
|
villebro
left a comment
There was a problem hiding this comment.
Thanks for this critical fix! One optional request on the tests: if it's possible to do a full integration test without extensive mocking that would be preferable. But if not this is good to merge.
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@villebro , added the integration test . I can merge if the changes look good to you. |
(cherry picked from commit 4b9856b)
SUMMARY
get_current_user_subject_ids() returned [] for anonymous requests, so REGULAR RLS rules assigned to the public role (AUTH_ROLE_PUBLIC) never matched and logged-out viewers of public dashboards were not filtered. Anonymous requests now carry the public role's subject, the same role get_user_roles() grants them.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION