f083b328f4
This enhancement adds a REST API endpoint to list a patron's recalls:
/api/v1/patrons/{patron_id}/recalls
This depends on the logged in patron having the manage_recalls subpermission.
To test:
1. Log in to the staff interface as your superlibrarian self (Patron A)
2. Go to Koha Administration -> Global system preferences. Enable the UseRecalls system preference
3. Set the relevant recalls circulation and fines rules
4. Search for an item (Item A)
5. Check out Item A to yourself (Patron A)
6. Log in to the OPAC as Patron B, a patron who does not have the manage_recalls permission
7. Search for Item A and request a recall
8. While still logged in to the OPAC as Patron B, hit this URL: https://your-opac-url/api/v1/patrons/patron-b-borrowernumber/recalls (swap out your URL and Patron B's borrowernumber)
9. Confirm you are given an error: "Authorization failure. Missing required permission(s)."
10. Log out of the OPAC and log back in, this time as Patron A
11. Hit the URL again https://your-opac-url/api/v1/patrons/patron-b-borrowernumber/recalls
12. Confirm you are able to view a list of Patron B's recalls
13. Confirm tests pass: t/db_dependent/api/v1/patrons_recalls.t
Sponsored-by: Auckland University of Technology
PA amended: QA follow-up: tidy
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit
|
||
---|---|---|
.. | ||
Acquisition | ||
Biblio | ||
Budgets | ||
Circulation | ||
cypress | ||
data | ||
db_dependent | ||
edi_testfiles | ||
etc | ||
External | ||
Koha | ||
lib | ||
Number | ||
Search | ||
Serials | ||
SIP | ||
Template | ||
Test | ||
00-check-atomic-updates.t | ||
00-deprecated.t | ||
00-load.t | ||
00-merge-conflict-markers.t | ||
00-testcritic.t | ||
00-valid-xml.t | ||
Auth.t | ||
AuthoritiesMarc_MARC21.t | ||
AuthoritiesMarc_UNIMARC.t | ||
Barcodes_annual.t | ||
Barcodes_EAN13.t | ||
Barcodes_hbyymmincr.t | ||
Barcodes_incremental.t | ||
Biblio.t | ||
Biblio2.t | ||
Budgets.t | ||
Charset.t | ||
Circulation_barcodedecode.t | ||
ClassSortRoutine.t | ||
ClassSortRoutine_Dewey.t | ||
ClassSortRoutine_Generic.t | ||
ClassSortRoutine_LCC.t | ||
ClassSource.t | ||
Context.t | ||
Contract.t | ||
CookieManager.t | ||
Creators.t | ||
DateUtils.t | ||
dummy.t | ||
Edifact.t | ||
EdiInvoice.t | ||
Ediorder.t | ||
Ediordrsp.t | ||
Form_MessagingPreferences.t | ||
HtmlTags.t | ||
ImportBatch.t | ||
Installer_PerlModules.t | ||
ItemCirculationAlertPreference.t | ||
Koha_MetadataRecord.t | ||
Koha_SearchEngine_Elasticsearch_Browse.t | ||
Koha_Template_Plugin_Cache.t | ||
Koha_Template_Plugin_HtmlId.t | ||
Koha_Template_Plugin_Koha.t | ||
Koha_Util_FrameworkPlugin.t | ||
Koha_Util_MARC.t | ||
Koha_XSLT_HTTPS.t | ||
Labels.t | ||
Labels_split_ccn.t | ||
Labels_split_ddcn.t | ||
Labels_split_lccn.t | ||
Labels_split_Regex.t | ||
Languages.t | ||
Logger.t | ||
Makefile.t | ||
Members_Messaging.t | ||
OpenLibrarySearch.t | ||
Output.t | ||
Output_JSONStream.t | ||
Patroncards.t | ||
Patroncards_Batch.t | ||
Patroncards_Lib.t | ||
Patroncards_Patroncard.t | ||
Patroncards_Profile.t | ||
Patroncards_Template.t | ||
RecordProcessor.t | ||
Ris.t | ||
Scheduler.t | ||
Scrubber.t | ||
Search.t | ||
Search_PazPar2.t | ||
SimpleMARC.t | ||
SMS.t | ||
SuggestionEngine.t | ||
SuggestionEngine_AuthorityFile.t | ||
template_filters.t | ||
timezones.t | ||
TmplToken.t | ||
Token.t |