Administrator should be able to set user's password
Description
Administrator should be able to set user's password. This solution should help with implementation contract test for creating new user (https://openlmis.atlassian.net/browse/OLMIS-1014#icft=OLMIS-1014). This would also respond to the requests from the field.
It works. Permission USERS_MANAGE is required for using this endpoint: /users/passwordReset. Without assigned right, user cannot change the password.
Jakub Kondrat
February 2, 2017 at 2:20 PM
(edited)
@Josh Zamor@Chongsun Ahn There is also a passwordReset endpoint in referencedata that checks USERS_MANAGE right and calls the one from auth: 1. /users/passwordReset (referencedata) 2. USERS_MANAGE right check 3. Service level call to /users/auth/passwordReset 4. ADMIN authority check 5. Password is actually changed Should we refactor it somehow? E.g. we could make the one from auth accept service level tokens only
The problem here is that auth doesn't know anything about user profiles and their rights so we have to check them in referencedata
Jakub Kondrat
February 2, 2017 at 1:26 PM
QA: It should already be possible for users with admin authority: "/users/auth/passwordReset"
I think we actually need a new endpoint, and the one above should be updated to make it clear that it requires a password reset token.
Admin permission to change anyone's password would be the USERS_MANAGE right. Need to take in user's UUID Need to check that current user has USERS_MANAGE right, UNLESS the password being changed is the one for the current user, than no right is needed (just need to be authenticated)
Mary Jo Kochendorfer
January 26, 2017 at 6:35 PM
Hi folks. I'd like it to be in 3.0 but I'd need to understand the level of effort. We have heard both for our development and in Tanzania that it can be difficult leaving password changes only to end users.
Done
Pinned fields
Click on the next to a field label to start pinning.
Administrator should be able to set user's password. This solution should help with implementation contract test for creating new user (https://openlmis.atlassian.net/browse/OLMIS-1014#icft=OLMIS-1014). This would also respond to the requests from the field.
Acceptance Criteria
an administrator can set a users password
check for admin rights