https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41869
David Nind <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed --- Comment #5 from David Nind <[email protected]> --- Thanks for the test plan! For a non-developer like myself, steps 2 and 3 are a bit of a mystery 8-) I muddled through, here are my testing notes (using KTD): 1. Edit Henry Acevedo's account so that you can log in as Henry. 2. Set Henry's permissions: - Staff access, allows viewing of catalogue in staff interface (catalogue) - Place and modify holds for patrons (reserveforothers) - Add, modify and view patron information (borrowers) 3. Test placing and modifying a hold using the API, using Henry's credentials (I used Bruno https://www.usebruno.com/) - these should be successful. (I used Mary Burton (patron_id = 49) as the patron and Programming perl (biblio_id = 262) for the record.) 3.1 Place a hold: POST 127.0.0.1:8081/api/v1/holds Auth: Basic Auth with Henry's username and password Body (JSON): { "patron_id": "49", "biblio_id": "262", "pickup_library_id": "CPL" } 3.2 Modify a hold (changes the hold date) (assuming the hold_id = "1"*, adjust as appropriate): PATCH 127.0.0.1:8081/api/v1/holds/1 Auth: Basic Auth with Henry's username and password Body (JSON): { "hold_date": "2026-02-17", "pickup_library_id": "CPL" } * To find the hold_id: - Access the database: koha-mysql kohadev - List the holds: select * from reserves; 4. Delete the hold created for Mary, using the staff interface. 5. Change Henry's permissions: - remove "Move holds between items and records (alter_hold_targets)" permission (leaves "Modify holds priority (modify_holds_priority)" and "Place holds for patrons (place_holds)" selected) 6. Test placing and modifying a hold using the API as per steps 3.1 and 3.2 - should return an error: 403 error returned: { "error": "Authorization failure. Missing required permission(s).", "required_permissions": { "reserveforothers": "1" } } 7. Test placing a hold as Henry using the staff interface - this should be successful! 8. Delete the hold created, using the staff interface. 8. Apply the patch, run yarn build, and restart everything (restart_all). 9. Repeat steps 3.1 and 3.2 - these should now be successful. 10. Repeat step 7 - this should be successful. 11. The tests should pass: prove t/db_dependent/api/v1/holds.t -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://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/
