-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: login button does not render #19685
Conversation
c26d980
to
b87d364
Compare
b87d364
to
a21ddaf
Compare
Codecov Report
@@ Coverage Diff @@
## master #19685 +/- ##
==========================================
- Coverage 66.50% 66.50% -0.01%
==========================================
Files 1683 1684 +1
Lines 64520 64525 +5
Branches 6607 6612 +5
==========================================
+ Hits 42910 42913 +3
Misses 19916 19916
- Partials 1694 1696 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, LGTM. Thanks for the fix!
* fix: login button does not render * add type guard (cherry picked from commit 2ba484f)
🏷️ preset:2022.15 |
* fix: login button does not render * add type guard
* fix: login button does not render * add type guard
SUMMARY
PR #19051 caused a regression causing the welcome page to fail to render for anonymous users. This adds a new type
UndefinedUser
(an empty object), adds type guards for bothUser
andUserWithPermissionsAndRoles
and updates related functions based on the following comment:superset/superset-frontend/src/dashboard/util/findPermission.test.ts
Lines 137 to 138 in 6e8e29c
In addition, tests are added to ensure
isAdminUser
works for all relevant user types.AFTER
Now the welcome page renders correctly:
BEFORE
When going to the main page without being logged in, the following appears:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION