-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Example User Provider] Fix inability to get to example login form #7728
base: master
Are you sure you want to change the base?
Conversation
…well as return possible roles after login promise has resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7728 +/- ##
==========================================
- Coverage 56.87% 56.57% -0.31%
==========================================
Files 673 673
Lines 27182 27183 +1
Branches 2635 2635
==========================================
- Hits 15461 15380 -81
- Misses 11390 11472 +82
Partials 331 331
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@@ -141,7 +141,7 @@ export default class ExampleUserProvider extends EventEmitter { | |||
} | |||
|
|||
getPossibleRoles() { | |||
return this.user.getRoles(); | |||
return this.loginPromise.then(() => this.user.getRoles()); |
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.
Normal practise, is to use underscore (_) as a parameter in the promise constructor. Just a nitpick
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.
Given that the argument is unused
Tests, please. Nothing should be pushed any more without tests. |
Closes #7727
Describe your changes:
Changed how we assign defaults for the argument object. In
getPossibleRoles
wait for login promise to resolve, before accessing the user object.All Submissions:
Author Checklist
type:
label? Note: this is not necessarily the same as the original issue.Reviewer Checklist