[Koha-bugs] [Bug 13895] Add API routes for checkouts retrieval and renewal
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Aug 2 15:00:20 CEST 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895
--- Comment #29 from Lari Taskula <larit at student.uef.fi> ---
Created attachment 53901
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53901&action=edit
Bug 13895: Allow user to access their own checkouts and renew them
Let user access their own checkouts and if OpacRenewalAllowed system preference
is on, also let user to renew their checkouts.
Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
cookie) with a Patron that has no permissions. This Patron will be
referred as "your patron" or "your borrowernumber" below.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
XXX with your borrowernumber) and check you receive correct data
3. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
XXX with someone else's borrowernumber) and check you get a permission
error.
4. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
existing checkout id of your Patron) and check you receive correct data
5. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
existing checkout id of some other Patron) and check you get a permission
error.
6. Send PUT request to http://yourlibrary/api/v1/checkouts/YYY, replace YYY
with existing checkout id of some other Patron. You should get a permission
error.
7. Set system preference OpacRenewalAllowed to 0.
8. Send PUT request to http://yourlibrary/api/v1/checkouts/YYY. YYY should be
checkout id of checkout for your patron. You should get a permission error.
9. Set system preference OpacRenewalAllowed to 1.
10. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
the maximum number of renewals is reached (you should have a 403
error). YYY should be checkout id of checkout for your patron.
11. Run unit tests in t/db_dependent/api/v1/checkouts.t
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list