Koha-clms/Koha/REST/V1
Aleisha Amohia f083b328f4 Bug 35967: Add REST API endpoint to list patron recalls
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 9d8254efd3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-05-23 16:22:16 +02:00
..
Acquisitions Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
Auth Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
Biblios Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
CashRegisters Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
Clubs Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
Config/SMTP Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
ERM Bug 36093: Add unit test and fix QA tests 2024-05-23 15:55:22 +02:00
OAuth Bug 34271: Remove a few Logger statements from REST API 2023-10-18 10:26:03 -03:00
Patrons Bug 35967: Add REST API endpoint to list patron recalls 2024-05-23 16:22:16 +02:00
Preservation Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
AdvancedEditorMacro.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
ArticleRequests.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
Auth.pm Bug 36420: Allow Basic authentication using `cardnumber` 2024-05-23 15:29:14 +02:00
AuthorisedValueCategories.pm Bug 32997: Add REST API endpoint to list authorised values for multiple given categories 2023-03-02 12:00:15 -03:00
AuthorisedValues.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
Authorities.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
BackgroundJobs.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
Biblios.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
Bookings.pm Bug 36100: (QA follow-up) Move 400 to 409 2024-03-11 11:00:23 +01:00
Checkouts.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
CirculationRules.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Cities.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
ERM.pm Bug 33606: (QA follow-up) Cosmetic changes 2023-07-06 12:24:15 -03:00
Holds.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
Illbackends.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
IllbatchStatuses.pm Bug 30719: (QA follow-up) Rename illbatchstatuses 2023-10-17 14:45:22 -03:00
Illbatches.pm Bug 30719: (QA follow-up) Pick better column names and cleanup 2023-10-17 14:45:23 -03:00
Illrequests.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
ImportBatchProfiles.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
ImportRecordMatches.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
ItemTypes.pm Bug 34008: (QA follow-up) 'item_type_id' should be used 2023-11-01 17:23:15 -03:00
Items.pm Bug 35963: Fix bundled items table ordering and filtering 2024-03-11 10:42:34 +01:00
Libraries.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
OAuth.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
Patrons.pm Bug 36483: Patrons.pm use case 2024-05-23 14:47:41 +02:00
Preservation.pm Bug 30708: Tidy perl files 2023-10-18 15:42:04 -03:00
Quotes.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
ReturnClaims.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
SearchFilter.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
Stage.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
Static.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Suggestions.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
Tickets.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
TransferLimits.pm Bug 36483: Make API controllers use $c->objects->to_api 2024-05-23 14:47:41 +02:00
TwoFactorAuth.pm Bug 30843: Add mfa_range configuration option for TOTP 2023-09-25 10:53:51 -03:00