[Bug 17006] New: REST API: add route to change patron's password
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Bug ID: 17006 Summary: REST API: add route to change patron's password Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: mail@jkozlovsky.cz QA Contact: testopia@bugs.koha-community.org Add API to change patron's password. This is useful especially for 3rd party applications like VuFind. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Mike <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored CC| |black23@gmail.com, | |josef.moravec@gmail.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Mike <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |Sposored by Ministry of release notes| |Culture Czech | |Republic/Minucipal Libray | |Ceska Trebova -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Mike <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|Sposored by Ministry of |Minucipal Libray Ceska release notes|Culture Czech |Trebova |Republic/Minucipal Libray | |Ceska Trebova | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Mike <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|Minucipal Libray Ceska |Municipal Libray Ceska release notes|Trebova |Trebova -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Jiří Kozlovský <mail@jkozlovsky.cz> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |16652 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16652 [Bug 16652] Omnibus: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Lari Taskula <larit@student.uef.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |larit@student.uef.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Lari Taskula <larit@student.uef.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #1 from Lari Taskula <larit@student.uef.fi> --- Created attachment 54575 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54575&action=edit 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' -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #2 from Lari Taskula <larit@student.uef.fi> --- Created attachment 54576 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54576&action=edit Bug 17006: Respect system preference "OpacPasswordChange" Allow patron to change their own password without borrowers-flag only if OpacPasswordChange system preference is enabled. To test: 1. Apply patch 2. Run t/db_dependent/api/v1/patrons.t 3. Set OpacPasswordChange system preference to "Don't allow". 4. Send PATCH request to http://library/api/v1/patrons/YYY/password where YYY is existing borrowernumber for a borrower that does not have any permissions 5. Observe permission error. 6. Set OpacPasswordChange system preference to "Allow". 7. Repeat step 4 and make sure that password was changed. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Lari Taskula <larit@student.uef.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54575|0 |1 is obsolete| | --- Comment #3 from Lari Taskula <larit@student.uef.fi> --- Created attachment 54629 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54629&action=edit Bug 17006: Add API route for changing patron's password Fixed trailing whitespace -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Lari Taskula <larit@student.uef.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54576|0 |1 is obsolete| | --- Comment #4 from Lari Taskula <larit@student.uef.fi> --- Created attachment 54630 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54630&action=edit Bug 17006: Respect system preference "OpacPasswordChange" -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54629|0 |1 is obsolete| | Attachment #54630|0 |1 is obsolete| | --- Comment #5 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 54716 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54716&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 <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54716|0 |1 is obsolete| | --- Comment #6 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 54717 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54717&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 <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #7 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 54718 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54718&action=edit [SIGNED-OFF] Bug 17006: Respect system preference "OpacPasswordChange" Allow patron to change their own password without borrowers-flag only if OpacPasswordChange system preference is enabled. To test: 1. Apply patch 2. Run t/db_dependent/api/v1/patrons.t 3. Set OpacPasswordChange system preference to "Don't allow". 4. Send PATCH request to http://library/api/v1/patrons/YYY/password where YYY is existing borrowernumber for a borrower that does not have any permissions 5. Observe permission error. 6. Set OpacPasswordChange system preference to "Allow". 7. Repeat step 4 and make sure that password was changed. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54717|0 |1 is obsolete| | --- Comment #8 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 56155 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56155&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 and minify swagger.json perl misc/devel/minifySwagger.pl -s api/v1/swagger/swagger.json -d api/v1/swagger/swagger.min.json 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 <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54718|0 |1 is obsolete| | --- Comment #9 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 56156 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56156&action=edit [SIGNED-OFF] Bug 17006: Respect system preference "OpacPasswordChange" Allow patron to change their own password without borrowers-flag only if OpacPasswordChange system preference is enabled. To test: 1. Apply patch 2. Run t/db_dependent/api/v1/patrons.t 3. Set OpacPasswordChange system preference to "Don't allow". 4. Send PATCH request to http://library/api/v1/patrons/YYY/password where YYY is existing borrowernumber for a borrower that does not have any permissions 5. Observe permission error. 6. Set OpacPasswordChange system preference to "Allow". 7. Repeat step 4 and make sure that password was changed. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56155|0 |1 is obsolete| | --- Comment #10 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 56157 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56157&action=edit [SIGNED-OFF] Bug 17006: Add API route for changing patron's password Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56156|0 |1 is obsolete| | --- Comment #11 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 56158 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56158&action=edit [SIGNED-OFF] Bug 17006: Respect system preference "OpacPasswordChange" Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #12 from Lari Taskula <lari.taskula@jns.fi> --- Rebased on top of master. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56157|0 |1 is obsolete| | --- Comment #13 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 56283 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56283&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 <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56158|0 |1 is obsolete| | --- Comment #14 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 56284 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56284&action=edit [SIGNED-OFF] Bug 17006: Respect system preference "OpacPasswordChange" Allow patron to change their own password without borrowers-flag only if OpacPasswordChange system preference is enabled. To test: 1. Apply patch 2. Run t/db_dependent/api/v1/patrons.t 3. Set OpacPasswordChange system preference to "Don't allow". 4. Send PATCH request to http://library/api/v1/patrons/YYY/password where YYY is existing borrowernumber for a borrower that does not have any permissions 5. Observe permission error. 6. Set OpacPasswordChange system preference to "Allow". 7. Repeat step 4 and make sure that password was changed. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #15 from Lari Taskula <lari.taskula@jns.fi> --- Removed minification step from test plan after Bug 17432 was pushed to master. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #16 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 56399 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56399&action=edit Bug 17006: (follow-up) Test for changing another user's password The previous patches work for changing your own password, but the tests are lacking a case where librarian attempts to change patron's password. This feature was unnoticed and not implemented. To test: 1. Run t/db_dependent/api/v1/patrons.t 2. Observe failing test 3. Proceed to next patch to fix the failing test -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #17 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 56400 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56400&action=edit 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' -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #18 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 56401 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56401&action=edit Bug 17006: (follow-up) Use Koha::Exceptions for change password endpoint Koha::Exceptions are a nice way to handle erros and they should be used much more than they are now. This patch adds Koha::Exceptions into Koha::Patron->change_password_to sub and catches the exceptions in the controller. 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. curl -X PATCH http://library/api/v1/patrons/123/password \ --data '{"current_password":"123", "new_password":"1234"}' \ --cookie 'CGISESSID=055ca5a9a3ad3fb5052143bd015c1c10' -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56401|0 |1 is obsolete| | --- Comment #19 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 56409 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56409&action=edit Bug 17006: (follow-up) Use Koha::Exceptions for change password endpoint -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Josef Moravec <josef.moravec@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.moravec@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 <aleishaamohia@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #21 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 57357 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57357&action=edit [SIGNED-OFF] Bug 17006: Respect system preference "OpacPasswordChange" Allow patron to change their own password without borrowers-flag only if OpacPasswordChange system preference is enabled. To test: 1. Apply patch 2. Run t/db_dependent/api/v1/patrons.t 3. Set OpacPasswordChange system preference to "Don't allow". 4. Send PATCH request to http://library/api/v1/patrons/YYY/password where YYY is existing borrowernumber for a borrower that does not have any permissions 5. Observe permission error. 6. Set OpacPasswordChange system preference to "Allow". 7. Repeat step 4 and make sure that password was changed. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #22 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 57358 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57358&action=edit [SIGNED-OFF] Bug 17006: (follow-up) Test for changing another user's password The previous patches work for changing your own password, but the tests are lacking a case where librarian attempts to change patron's password. This feature was unnoticed and not implemented. To test: 1. Run t/db_dependent/api/v1/patrons.t 2. Observe failing test 3. Proceed to next patch to fix the failing test Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #23 from Josef Moravec <josef.moravec@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@gmail.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #24 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 57360 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57360&action=edit [SIGNED-OFF] Bug 17006: (follow-up) Use Koha::Exceptions for change password endpoint Koha::Exceptions are a nice way to handle erros and they should be used much more than they are now. This patch adds Koha::Exceptions into Koha::Patron->change_password_to sub and catches the exceptions in the controller. 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. curl -X PATCH http://library/api/v1/patrons/123/password \ --data '{"current_password":"123", "new_password":"1234"}' \ --cookie 'CGISESSID=055ca5a9a3ad3fb5052143bd015c1c10' Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lari.taskula@jns.fi |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mirko@abunchofthings.net Status|Signed Off |Failed QA --- Comment #25 from Mirko Tietgen <mirko@abunchofthings.net> --- I can't apply the last patch. Wende an: Bug 17006: (follow-up) Use Koha::Exceptions for change password endpoint fatal: sha1 information is lacking or useless (Koha/REST/V1/Patron.pm). Dem Repository fehlen notwendige Blobs um auf einen 3-Wege-Merge zurückzufallen. Kann nicht zu 3-Wege-Merge zurückfallen. Anwendung des Patches fehlgeschlagen bei 0001 Bug 17006: (follow-up) Use Koha::Exceptions for change password endpoint -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57356|0 |1 is obsolete| | Attachment #57357|0 |1 is obsolete| | Attachment #57358|0 |1 is obsolete| | Attachment #57359|0 |1 is obsolete| | Attachment #57360|0 |1 is obsolete| | --- Comment #26 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63329 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63329&action=edit 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 <aleishaamohia@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #27 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63330 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63330&action=edit Bug 17006: Respect system preference "OpacPasswordChange" Allow patron to change their own password without borrowers-flag only if OpacPasswordChange system preference is enabled. To test: 1. Apply patch 2. Run t/db_dependent/api/v1/patrons.t 3. Set OpacPasswordChange system preference to "Don't allow". 4. Send PATCH request to http://library/api/v1/patrons/YYY/password where YYY is existing borrowernumber for a borrower that does not have any permissions 5. Observe permission error. 6. Set OpacPasswordChange system preference to "Allow". 7. Repeat step 4 and make sure that password was changed. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #28 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63331 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63331&action=edit Bug 17006: (follow-up) Test for changing another user's password The previous patches work for changing your own password, but the tests are lacking a case where librarian attempts to change patron's password. This feature was unnoticed and not implemented. To test: 1. Run t/db_dependent/api/v1/patrons.t 2. Observe failing test 3. Proceed to next patch to fix the failing test Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #29 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63332 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63332&action=edit 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@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #30 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63333 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63333&action=edit Bug 17006: (follow-up) Use Koha::Exceptions for change password endpoint Koha::Exceptions are a nice way to handle erros and they should be used much more than they are now. This patch adds Koha::Exceptions into Koha::Patron->change_password_to sub and catches the exceptions in the controller. 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. curl -X PATCH http://library/api/v1/patrons/123/password \ --data '{"current_password":"123", "new_password":"1234"}' \ --cookie 'CGISESSID=055ca5a9a3ad3fb5052143bd015c1c10' Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #31 from Josef Moravec <josef.moravec@gmail.com> --- (In reply to Mirko Tietgen from comment #25)
I can't apply the last patch.
Wende an: Bug 17006: (follow-up) Use Koha::Exceptions for change password endpoint fatal: sha1 information is lacking or useless (Koha/REST/V1/Patron.pm). Dem Repository fehlen notwendige Blobs um auf einen 3-Wege-Merge zurückzufallen. Kann nicht zu 3-Wege-Merge zurückfallen. Anwendung des Patches fehlgeschlagen bei 0001 Bug 17006: (follow-up) Use Koha::Exceptions for change password endpoint
Rebased on master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18298 CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63329|0 |1 is obsolete| | Attachment #63330|0 |1 is obsolete| | Attachment #63331|0 |1 is obsolete| | Attachment #63332|0 |1 is obsolete| | Attachment #63333|0 |1 is obsolete| | --- Comment #32 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 67128 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67128&action=edit 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 <aleishaamohia@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #33 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 67129 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67129&action=edit Bug 17006: Respect system preference "OpacPasswordChange" Allow patron to change their own password without borrowers-flag only if OpacPasswordChange system preference is enabled. To test: 1. Apply patch 2. Run t/db_dependent/api/v1/patrons.t 3. Set OpacPasswordChange system preference to "Don't allow". 4. Send PATCH request to http://library/api/v1/patrons/YYY/password where YYY is existing borrowernumber for a borrower that does not have any permissions 5. Observe permission error. 6. Set OpacPasswordChange system preference to "Allow". 7. Repeat step 4 and make sure that password was changed. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #34 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 67130 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67130&action=edit Bug 17006: (follow-up) Test for changing another user's password The previous patches work for changing your own password, but the tests are lacking a case where librarian attempts to change patron's password. This feature was unnoticed and not implemented. To test: 1. Run t/db_dependent/api/v1/patrons.t 2. Observe failing test 3. Proceed to next patch to fix the failing test Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #35 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 67131 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67131&action=edit 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@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #36 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 67132 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67132&action=edit Bug 17006: (follow-up) Use Koha::Exceptions for change password endpoint Koha::Exceptions are a nice way to handle erros and they should be used much more than they are now. This patch adds Koha::Exceptions into Koha::Patron->change_password_to sub and catches the exceptions in the controller. 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. curl -X PATCH http://library/api/v1/patrons/123/password \ --data '{"current_password":"123", "new_password":"1234"}' \ --cookie 'CGISESSID=055ca5a9a3ad3fb5052143bd015c1c10' Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off --- Comment #37 from Josef Moravec <josef.moravec@gmail.com> --- Rebased on master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Web services |REST api QA Contact|testopia@bugs.koha-communit | |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #38 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Note for QA: I think Koha::Patron->change_password_to must call Koha::AuthUtils::is_password_valid (from bug 18298). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Signed Off |Patch doesn't apply --- Comment #39 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Patch doesn't apply, please also take a look at comment#38. Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 17006: Add API route for changing patron's password Using index info to reconstruct a base tree... M Koha/Patron.pm M Koha/REST/V1/Patron.pm M api/v1/swagger/paths.json M api/v1/swagger/paths/patrons.json M t/db_dependent/api/v1/patrons.t Falling back to patching base and 3-way merge... Auto-merging t/db_dependent/api/v1/patrons.t Auto-merging api/v1/swagger/paths/patrons.json Auto-merging api/v1/swagger/paths.json CONFLICT (content): Merge conflict in api/v1/swagger/paths.json Auto-merging Koha/REST/V1/Patron.pm Auto-merging Koha/Patron.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 17006: Add API route for changing patron's password The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-17006-Add-API-route-for-changing-patrons-passw-7eNHth.patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67128|0 |1 is obsolete| | Attachment #67129|0 |1 is obsolete| | Attachment #67130|0 |1 is obsolete| | Attachment #67131|0 |1 is obsolete| | Attachment #67132|0 |1 is obsolete| | --- Comment #40 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 70260 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70260&action=edit 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 <aleishaamohia@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #41 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 70261 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70261&action=edit Bug 17006: Respect system preference "OpacPasswordChange" Allow patron to change their own password without borrowers-flag only if OpacPasswordChange system preference is enabled. To test: 1. Apply patch 2. Run t/db_dependent/api/v1/patrons.t 3. Set OpacPasswordChange system preference to "Don't allow". 4. Send PATCH request to http://library/api/v1/patrons/YYY/password where YYY is existing borrowernumber for a borrower that does not have any permissions 5. Observe permission error. 6. Set OpacPasswordChange system preference to "Allow". 7. Repeat step 4 and make sure that password was changed. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #42 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 70262 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70262&action=edit Bug 17006: (follow-up) Test for changing another user's password The previous patches work for changing your own password, but the tests are lacking a case where librarian attempts to change patron's password. This feature was unnoticed and not implemented. To test: 1. Run t/db_dependent/api/v1/patrons.t 2. Observe failing test 3. Proceed to next patch to fix the failing test Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #43 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 70263 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70263&action=edit 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@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #44 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 70264 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70264&action=edit Bug 17006: (follow-up) Use Koha::Exceptions for change password endpoint Koha::Exceptions are a nice way to handle erros and they should be used much more than they are now. This patch adds Koha::Exceptions into Koha::Patron->change_password_to sub and catches the exceptions in the controller. 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. curl -X PATCH http://library/api/v1/patrons/123/password \ --data '{"current_password":"123", "new_password":"1234"}' \ --cookie 'CGISESSID=055ca5a9a3ad3fb5052143bd015c1c10' Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #45 from Josef Moravec <josef.moravec@gmail.com> --- Rebased on master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Depends on| |19784 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784 [Bug 19784] Adapt /v1/patrons to new naming guidelines -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #46 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This should be implemented on top of bug 19784. Also, I see no reason to require the 'old password'. Conceptually, I would say we are updating the password "object". This means we need to PUT a new password. If we changed the password by hitting the patron/patron_id endpoint, then PATCH would be advised. But on this implementation we should def use PUT. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |https://wiki.koha-community | |.org/wiki/Patrons_password_ | |endpoint_RFC Assignee|lari.taskula@jns.fi |tomascohen@gmail.com --- Comment #47 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I'm taking over this one with Lari's agreement. I will add a RFC proposal to be voted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|REST API: add route to |Add route to change |change patron's password |patron's password -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Bug 17006 depends on bug 19784, which changed state. Bug 19784 Summary: Adapt /v1/patrons to new naming guidelines https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|19784 |21178 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784 [Bug 19784] Adapt /v1/patrons to new naming guidelines https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21178 [Bug 21178] Add Koha::Patron::set_password method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|21178 |21233 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21178 [Bug 21178] Add Koha::Patron::set_password method https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21233 [Bug 21233] Add Koha::Exceptions::Password class -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70264|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70260|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70261|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70262|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70263|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #48 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77882 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77882&action=edit Bug 17006: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #49 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77883 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77883&action=edit Bug 17006: OpenAPI spec Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #50 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77884 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77884&action=edit Bug 17006: Add /patrons/{patron_id}/password This patch introduces an endpoint for changing a patron's password. To test: - Apply this patchset - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons_password.t => SUCCESS: tests pass! - Play with the different use cases highlighted by the tests, on your favourite REST testing tool (Postman, RESTer on FF, etc). Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77882|0 |1 is obsolete| | Attachment #77883|0 |1 is obsolete| | Attachment #77884|0 |1 is obsolete| | --- Comment #51 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 77923 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77923&action=edit Bug 17006: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #52 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 77924 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77924&action=edit Bug 17006: OpenAPI spec Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #53 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 77925 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77925&action=edit Bug 17006: Add /patrons/{patron_id}/password This patch introduces an endpoint for changing a patron's password. To test: - Apply this patchset - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons_password.t => SUCCESS: tests pass! - Play with the different use cases highlighted by the tests, on your favourite REST testing tool (Postman, RESTer on FF, etc). Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #54 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- tomas: yet another whitespaces occurrence ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #55 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 78837 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78837&action=edit Bug 17006: (follow-up) Whitespace chars follow-up Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #56 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Marcel de Rooy from comment #54)
tomas: yet another whitespaces occurrence ;)
(Marcel follow-up) submitted :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply --- Comment #57 from Michal Denar <black23@gmail.com> --- Please rebase on master I get error: Using index info to reconstruct a base tree... M api/v1/swagger/paths.json Falling back to patching base and 3-way merge... Auto-merging api/v1/swagger/paths.json CONFLICT (content): Merge conflict in api/v1/swagger/paths.json Failed to merge in the changes. Patch failed at 0001 Bug 17006: OpenAPI spec Thank You Mike -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Bug 17006 depends on bug 21233, which changed state. Bug 21233 Summary: Add Koha::Exceptions::Password class https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21233 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com Status|Patch doesn't apply |Needs Signoff --- Comment #58 from M. Tompsett <mtompset@hotmail.com> --- Bug 20944 caused a conflict. easily fixed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77923|0 |1 is obsolete| | --- Comment #59 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 82625 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82625&action=edit Bug 17006: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77924|0 |1 is obsolete| | --- Comment #60 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 82626 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82626&action=edit Bug 17006: OpenAPI spec Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77925|0 |1 is obsolete| | --- Comment #61 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 82627 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82627&action=edit Bug 17006: Add /patrons/{patron_id}/password This patch introduces an endpoint for changing a patron's password. To test: - Apply this patchset - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons_password.t => SUCCESS: tests pass! - Play with the different use cases highlighted by the tests, on your favourite REST testing tool (Postman, RESTer on FF, etc). Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #78837|0 |1 is obsolete| | --- Comment #62 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 82628 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82628&action=edit Bug 17006: (follow-up) Whitespace chars follow-up Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #63 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Rebased. Please mark as 'Patch doesn't apply' so people notice what needs to be done! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21890 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #64 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Sorry Tomas but I think we should use set_password (from bug 21178) now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alex.arnaud@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82625|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82626|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82627|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82628|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22059 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22059 [Bug 22059] Wrong exception parameters in Koha::Patron->set_password -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #65 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 83579 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83579&action=edit Bug 17006: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #66 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 83580 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83580&action=edit Bug 17006: OpenAPI spec Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #67 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 83581 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83581&action=edit Bug 17006: Add /patrons/{patron_id}/password This patch introduces an endpoint for changing a patron's password. It targets privileged user with the right permissions, changing some patron's password. To test: - Apply this patchset - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons_password.t => SUCCESS: tests pass! - Play with the different use cases highlighted by the tests, on your favourite REST testing tool (Postman, RESTer on FF, etc). Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #68 from Tomás Cohen Arazi <tomascohen@gmail.com> --- As we voted for having a /public endpoint for unprivileged routes, I simplified the implementation and removed that use case. I will file a new bug for implementing the on/off switch for the /public namespace, and the endpoint for changing passwords for un-privileged users. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22061 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |22061 See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22061 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22061 [Bug 22061] Public route to change password -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #83579|0 |1 is obsolete| | Attachment #83580|0 |1 is obsolete| | Attachment #83581|0 |1 is obsolete| | --- Comment #69 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 83749 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83749&action=edit Bug 17006: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #70 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 83750 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83750&action=edit Bug 17006: OpenAPI spec Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #71 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 83751 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83751&action=edit Bug 17006: Add /patrons/{patron_id}/password This patch introduces an endpoint for changing a patron's password. It targets privileged user with the right permissions, changing some patron's password. To test: - Apply this patchset - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons_password.t => SUCCESS: tests pass! - Play with the different use cases highlighted by the tests, on your favourite REST testing tool (Postman, RESTer on FF, etc). Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Bug 17006 depends on bug 22059, which changed state. Bug 22059 Summary: Wrong exception parameters in Koha::Patron->set_password https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22059 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #83749|0 |1 is obsolete| | Attachment #83750|0 |1 is obsolete| | Attachment #83751|0 |1 is obsolete| | --- Comment #72 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 84285 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84285&action=edit Bug 17006: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #73 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 84286 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84286&action=edit Bug 17006: OpenAPI spec Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #74 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 84287 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84287&action=edit Bug 17006: Add /patrons/{patron_id}/password This patch introduces an endpoint for changing a patron's password. It targets privileged user with the right permissions, changing some patron's password. To test: - Apply this patchset - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons_password.t => SUCCESS: tests pass! - Play with the different use cases highlighted by the tests, on your favourite REST testing tool (Postman, RESTer on FF, etc). Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |new feature -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 --- Comment #75 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 84488 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84488&action=edit Bug 17006: (follow-up) set_password expects a hashref Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #76 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Depends on| |22047 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22047 [Bug 22047] set_password should have a 'skip_validation' param -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #77 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- As is my policy on non-breaking api additions I have backported this to 18.11.x series for 18.11.03 release. I have also added the missing `Sponsored-by: Municipal Libray Ceska Trebova` lines so due appreciation is shown in the release notes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #78 from Lucas Gass <lucas@bywatersolutions.com> --- missing dependencies, wont backport to 18.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|Municipal Libray Ceska |Sponsored by Municipal release notes|Trebova |Library Ceska Trebova -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add route to change |Add route to change |patron's password |patron's password | |(authenticated) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|Sponsored by Municipal |Sponsored by Municipal release notes|Library Ceska Trebova |Library Ceska Trebova | | | |This | |new feature allows a | |administrators to change a | |users password via the API -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|Sponsored by Municipal |This new feature allows a release notes|Library Ceska Trebova |administrators to change a | |users password via the API |This | |new feature allows a |Sponsored by Municipal |administrators to change a |Library Ceska Trebova |users password via the API | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org