chore(D2D): Add granular permission for dashboard drilling operations
SUMMARY
It currently requires granting can_expore on Superset permission to users in order to enable D2D operations (Drill by and Drill to Detail). Some organizations might want to expose this control without necessarily exposing charts/the ability to access Explore.
This PR includes an alternative permission that can be used to enable D2D operations without granting the can_expore perm.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
No UI changes.
TESTING INSTRUCTIONS
Tests added. For manual testing:
- Create a role that have required all the required perms for D2D operations (including the
can_expore on Supersetpermission). - Replace this permission with the
can_drill on Dashboardperm. - Log in with an account that is associated with this role and validate that D2D operations are available.
ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in SIP-59)
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 70.14%. Comparing base (
76d897e) to head (8b04095). Report is 86 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #28435 +/- ##
==========================================
+ Coverage 60.48% 70.14% +9.65%
==========================================
Files 1931 1944 +13
Lines 76236 77220 +984
Branches 8568 8652 +84
==========================================
+ Hits 46114 54164 +8050
+ Misses 28017 20934 -7083
- Partials 2105 2122 +17
| Flag | Coverage Δ | |
|---|---|---|
| hive | 49.03% <100.00%> (-0.14%) |
:arrow_down: |
| javascript | 57.72% <100.00%> (+0.01%) |
:arrow_up: |
| mysql | 77.04% <100.00%> (?) |
|
| postgres | 77.18% <100.00%> (?) |
|
| presto | 53.59% <100.00%> (-0.21%) |
:arrow_down: |
| python | 83.35% <100.00%> (+19.87%) |
:arrow_up: |
| sqlite | 76.62% <100.00%> (?) |
|
| unit | 58.75% <0.00%> (+1.13%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.