Skip to content
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

adding role resets password? #53

Closed
coderofsalvation opened this issue Jul 27, 2017 · 2 comments
Closed

adding role resets password? #53

coderofsalvation opened this issue Jul 27, 2017 · 2 comments

Comments

@coderofsalvation
Copy link
Collaborator

Not totally sure about it, but i noticed a missing password-property.
Im suspecting that adding some roles (thru expressa-admin) caused this.
I'll do some more research.

@coderofsalvation
Copy link
Collaborator Author

ok..i think i know what it was...during a PUT request of a user..the password was omitted automatically by the role-middleware.
I found a workaround, but im a bit afraid that my team will be bitten by this again.
Therefore I did a PR, which kindof 'reveals' all kindof magic performed by role-middleware:

#54

@thomas4019
Copy link
Owner

Ohh, that makes sense. For safety reasons I think it makes sense to omit the password, but I see now I have a pending TODO about this issue. So far, the approach I've been using for user updates is to POST to 'users/:id/update' with the following data.

var data = {
            $set: this.data,
            $unset: {'permissions': true}
          }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants