Repository navigation
chore: Refactor dashboard security access - #24804
john-bodley merged 1 commit into
Conversation
There was a problem hiding this comment.
These docs no longer exist.
d1d627b to
3a6710f
Compare
There was a problem hiding this comment.
Identical logic which was previously in raise_for_dashboard_access.
Codecov Report
@@ Coverage Diff @@
## master #24804 +/- ##
==========================================
+ Coverage 68.96% 69.00% +0.03%
==========================================
Files 1906 1906
Lines 74122 74127 +5
Branches 8208 8208
==========================================
+ Hits 51116 51148 +32
+ Misses 20883 20856 -27
Partials 2123 2123
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 9 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
736bddb to
dc7d725
Compare
|
@eschutho and @Vitor-Avila as mentioned in #24892 this refactor should help with your efforts in readdressing the problem outlined in #24808 as now the security_manager.raise_for_access(dashboard=dashboard, datasource=datasource)as opposed to security_manager.raise_for_access(datasource=datasource)or similar. |
dc7d725 to
32de355
Compare
32de355 to
b312294
Compare
|
thanks @john-bodley, that makes perfect sense! I'll wait for these changes to get merged too so I can update my fork and take a look at this. |
(cherry picked from commit 5522fac)
SUMMARY
Whilst spelunking through the codebase recently in order to fix some dashboard RBAC issues I noticed the
raise_for_dashboard_accessmethod (drafted prior to #13235) which coincides with the more genericraise_for_accessmethod.This PR extends the previous intent to migrate the logic into the
raise_for_accessmethod which ensures all entity based access checks use the same call stack. Furthermore this approach allows for more context aware checks, i.e., whether a user has access to a dataset/datasource in the context of viewing a dashboard.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
CI.
ADDITIONAL INFORMATION