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

Josef Moravec <josef.mora...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #56283|0                           |1
        is obsolete|                            |
  Attachment #56284|0                           |1
        is obsolete|                            |
  Attachment #56399|0                           |1
        is obsolete|                            |
  Attachment #56400|0                           |1
        is obsolete|                            |
  Attachment #56409|0                           |1
        is obsolete|                            |

--- Comment #20 from Josef Moravec <josef.mora...@gmail.com> ---
Created attachment 57356
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57356&action=edit
[SIGNED-OFF] Bug 17006: Add API route for changing patron's password

PATCH /patrons/{borrowernumber}/password (change password)

Required body params:
- current_password
- new_password

To test:
1. Apply patch
2. Run t/db_dependent/api/v1/patrons.t
3. Send PATCH request to http://library/api/v1/patrons/YYY/password
   where YYY is existing borrowernumber (borrowers flag required)
4. Make sure that password was changed.
5. Try also too short password, and wrong current password and observe
   that errors are displayed appropriately.

You may find this useful for testing:

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

Signed-off-by: Aleisha Amohia <aleishaamo...@hotmail.com>

Signed-off-by: Josef Moravec <josef.mora...@gmail.com>

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to