[Bug 17565] New: REST API: Let user cancel reserve according to CanReserveBeCanceledFromOpac
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17565 Bug ID: 17565 Summary: REST API: Let user cancel reserve according to CanReserveBeCanceledFromOpac 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: lari.taskula@jns.fi QA Contact: testopia@bugs.koha-community.org Currently REST API does not allow hold cancellation for an OPAC user. Only users with reserveforothers have ability to make cancellations. Let user cancel reserve according to CanReserveBeCanceledFromOpac -- 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=17565 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lari.taskula@jns.fi |ity.org | -- 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=17565 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17479 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17479 [Bug 17479] REST API: Save information on owner access -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17565 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17431 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431 [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17565 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17565 --- Comment #1 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 57264 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57264&action=edit Bug 17565: REST API: Let user cancel reserve according to CanReserveBeCanceledFromOpac This patch adds ability for patron to cancel their own holds. To test: 1. Make sure you have patches from dependant bugs. 2. Apply this patch. 3. Place a hold for a patron that has no permissions. 4. Set hold to Waiting or Transfer status (found => 'W' or 'T' in database). 5. Login with that patron (and get their CGISESSID for cURL). 6. Test DELETE operation for the reserve_id that you just created, e.g. with cURL: curl -X DELETE -H "Content-Type: application/json" \ --cookie 'CGISESSID=0230cb985c4fb5844f71ba41f76a0ced' \ http://yourlib/api/v1/holds/4621 7. Observe HTTP 403 code and following error message: "Hold is already in transfer or waiting and cannot be cancelled by patron." 8. Reset hold's "found"-status in database. 9. Run the same cURL command as in step 6. 10. Observe HTTP 200 code and empty object as return. 11. Test DELETE operation for any other reserve_id, e.g. with cURL curl -X DELETE -H "Content-Type: application/json" \ --cookie 'CGISESSID=0230cb985c4fb5844f71ba41f76a0ced' \ http://yourlib/api/v1/holds/123 12. Observe permission required error. 13. Run t/db_dependent/api/v1/holds.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17565 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=17565 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57264|0 |1 is obsolete| | --- Comment #2 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 59098 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59098&action=edit [SIGNED-OFF] Bug 17565: REST API: Let user cancel reserve according to CanReserveBeCanceledFromOpac This patch adds ability for patron to cancel their own holds. To test: 1. Make sure you have patches from dependant bugs. 2. Apply this patch. 3. Place a hold for a patron that has no permissions. 4. Set hold to Waiting or Transfer status (found => 'W' or 'T' in database). 5. Login with that patron (and get their CGISESSID for cURL). 6. Test DELETE operation for the reserve_id that you just created, e.g. with cURL: curl -X DELETE -H "Content-Type: application/json" \ --cookie 'CGISESSID=0230cb985c4fb5844f71ba41f76a0ced' \ http://yourlib/api/v1/holds/4621 7. Observe HTTP 403 code and following error message: "Hold is already in transfer or waiting and cannot be cancelled by patron." 8. Reset hold's "found"-status in database. 9. Run the same cURL command as in step 6. 10. Observe HTTP 200 code and empty object as return. 11. Test DELETE operation for any other reserve_id, e.g. with cURL curl -X DELETE -H "Content-Type: application/json" \ --cookie 'CGISESSID=0230cb985c4fb5844f71ba41f76a0ced' \ http://yourlib/api/v1/holds/123 12. Observe permission required error. 13. Run t/db_dependent/api/v1/holds.t 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=17565 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED CC| |m.de.rooy@rijksmuseum.nl --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Depends on a bug in FQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17565 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org QA Contact|testopia@bugs.koha-communit | |y.org | Component|Web services |REST api -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org