[Koha-bugs] [Bug 17006] REST API: add route to change patron's password

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 8 23:01:39 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006

--- Comment #23 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 57359
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57359&action=edit
[SIGNED-OFF] Bug 17006: (follow-up) Let librarians change patron's passwords

This should obviously be part of this feature but was left unnoticed in the
first patch. If user has "borrowers"-flag, they should be able to change
patron's
password without providing old password.

To test:
1. Run t/db_dependent/api/v1/patrons.t
2. Observe failing test
3. Apply patch
4. Run t/db_dependent/api/v1/patrons.t
5. Observe passing test
6. Send PATCH request to http://library/api/v1/patrons/YYY/password
   where YYY is existing borrowernumber (borrowers flag required)
   and where YYY is not the same borrowernumber as your logged-in
   user's borrowernumber
7. Make sure that password was changed for YYY.

You may find this useful for testing:

curl -X PATCH http://library/api/v1/patrons/123/password \
     --data '{"new_password":"1234"}' \
     --cookie 'CGISESSID=055ca5a9a3ad3fb5052143bd015c1c10'

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list