superset
superset copied to clipboard
chore: Fix/remove hardcode of admin role
SUMMARY
Just removed hardcode of admin role from perm utils and using AUTH_ROLE_ADMIN
constant in the Superset config instead.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
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
@supersetbot orglabel
Codecov Report
Attention: Patch coverage is 50.00000%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 69.77%. Comparing base (
c0f8dfc
) to head (06bbab7
). Report is 6 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
superset-frontend/src/preamble.ts | 0.00% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #27779 +/- ##
==========================================
+ Coverage 69.71% 69.77% +0.05%
==========================================
Files 1920 1920
Lines 75234 75244 +10
Branches 8423 8425 +2
==========================================
+ Hits 52447 52498 +51
+ Misses 20725 20684 -41
Partials 2062 2062
Flag | Coverage Δ | |
---|---|---|
hive | 48.93% <ø> (?) |
|
javascript | 57.39% <50.00%> (-0.01%) |
:arrow_down: |
mysql | 77.88% <ø> (-0.01%) |
:arrow_down: |
postgres | 77.99% <ø> (-0.01%) |
:arrow_down: |
python | 83.03% <ø> (+0.12%) |
:arrow_up: |
sqlite | 77.43% <ø> (-0.01%) |
:arrow_down: |
unit | 56.78% <ø> (+<0.01%) |
: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.
How I can add orglabel?)
@supersetbot orglabel
How I can add orglabel?)
@mistercrunch can probably help. Not sure if there's documentation for all this somewhere... we should probably add a page to the docs site or the wiki (probably the wiki, since that's where more process/dev content is going, while the docs are more end-user focused).
Codecov Report
Attention: Patch coverage is 50.00000%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 69.77%. Comparing base (
c0f8dfc
) to head (06bbab7
). Report is 38 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
superset-frontend/src/preamble.ts | 0.00% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #27779 +/- ##
==========================================
+ Coverage 69.71% 69.77% +0.05%
==========================================
Files 1920 1920
Lines 75234 75244 +10
Branches 8423 8425 +2
==========================================
+ Hits 52447 52498 +51
+ Misses 20725 20684 -41
Partials 2062 2062
Flag | Coverage Δ | |
---|---|---|
hive | 48.93% <ø> (?) |
|
javascript | 57.39% <50.00%> (-0.01%) |
:arrow_down: |
mysql | 77.88% <ø> (-0.01%) |
:arrow_down: |
postgres | 77.99% <ø> (-0.01%) |
:arrow_down: |
python | 83.03% <ø> (+0.12%) |
:arrow_up: |
sqlite | 77.43% <ø> (-0.01%) |
:arrow_down: |
unit | 56.78% <ø> (+<0.01%) |
: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.
@supersetbot unlabel TechAudit-BI
@supersetbot orglabel
The bot was down for some reason, revived it in recent PRs. More about the bot here -> https://github.com/apache-superset/supersetbot . It even has a logo now 🤖 🤖 🤖
Thank you @mistercrunch!
@john-bodley Hi! Fixed code by your review. Please take a look!
Rerunning the mysql test in hopes that it's just flaky, but if it fails again, the PR might need a rebase (there were some glitches with these DB tests that got resolved on master not long ago).
@rusackas Test cases has beed passed without rebase
The main thing I'm wondering about this PR now that I look more closely at the code, is if there's a better place to store this information. I'm a little nervous about storing bootstrap data on the window object, which opens up a new "junk drawer" pattern where people might store anything there. I'm not sure if we should have the Feature Flags there either, really. Is it possible to access this via the getBootstrapData()
like we do so many other things in the codebase already. It looks like the role is indeed in there.
@rusackas I see, ok. I have pushed commit with the fix :+1:, please take a look!