-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Allow password reset request for users in realms #2980
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
Conversation
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
|
Can one of the admins verify this patch? |
3 similar comments
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
test/user.test.js
Outdated
|
|
||
| var validCredentialsEmail = 'foo@bar.com'; | ||
| var validCredentials = {email: validCredentialsEmail, password: 'bar'}; | ||
| var validCredentials = {email: validCredentialsEmail, password: 'bar', realm: 'foobar'}; |
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.
@beeman would this make previous test using this variable test a different thing, perhaps we should just introduce a new variable to test this feature, then we can ensure the old no realm users work fine too
|
@davidcheung yep makes sense, I'll update the tests. |
|
@davidcheung I've updated the tests as per your suggestion. Please let me know if you have any more comments. |
e973c6d to
bc4b5c0
Compare
|
My pleasure @davidcheung, thanks for looking at it. Commits have been squashed into one. Do you want me to look at getting it into 3.x? Any special instructions for doing that or is it just a matter of getting it working in |
Thanks! that would be amazing, yeah there shouldnt any special instructions, i would like to see if @loay has any comments before we proceed though then we dont need to apply changes in 2 places. |
|
@davidcheung LGTM |
|
Thanks @loay @davidcheung I've checked the code in What I could do is create separate PR targeting |
|
@slnode test please |
|
I'll rebase when I'm back at my machine |
bc4b5c0 to
e7831f6
Compare
|
@slnode test please |
bajtos
left a comment
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.
I took a look, the changes LGMT too.
|
@slnode ok to test |
|
@slnode test please |
|
I've created a PR for adding the same feature to the 3.x branch #2998. Please let me know if there's anything more to do on either one of these PR's |
|
@slnode test please |
|
@beeman thanks! |
|
@davidcheung it looks like there are still a few tests failing, I don't have access to them though. Any insights on what makes them fail? |
|
i believe they are unrelated to your change |
|
Please send a PR to downstream ignore dashboard controller/gateway-director and land that first -- then return this PR. |
|
Storage might be related as master has always been green on ci.strongloop.com |
|
Test fails look unrelated initially but if you look at http://ci.strongloop.com/job/loopback-component-storage/, it's always been green. But if you look at https://cis-jenkins.swg-devops.com/job/ds/job/loopback-component-storage~1.x/16/console, seems like a legit fail. From what @davidcheung says, strongloop/loopback-component-storage#179 fixes this, so that will have to land before merging this PR. |
@superkhau it is passing on master here too |
|
@superkhau everytime we add downstream ignore to |
|
LGTM. Confirming fails can be ignored. Looks like they've always been failing on those specific branches. Approved for merging. |
@davidcheung This is really depends on the repo downstream (and whether it blocks your merge/needs override). In this case it doesn't, so the merge order doesn't matter. 👍 |
Description
Currently the
User.resetPasswordmethod only accepts an email address as a parameter.When you have a LoopBack application that partitions the users in Realms you need to
findthe user based on it's email address + realm, because it allows for 2 users with the same email address.This PR fixes the issue by adding support for an optional
realmproperty, that will enhance the filter used in thefindOnemethod.@bajtos @raymondfeng @superkhau could you please review?
Related issues
Checklist