Bug 33702: Patrons should only see their own ILLs in the OPAC
authorMagnus Enger <magnus@libriotech.no>
Tue, 9 May 2023 13:37:51 +0000 (15:37 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 29 May 2023 12:21:46 +0000 (09:21 -0300)
commit1ad43fd47fea1c616f2a6c301b97940cd335ce95
tree7ff28a90abc00c0763005043cb3baa98458f83ed
parent493819b92b8ecbe917b70cf564e7a0bdbbec9f89
Bug 33702: Patrons should only see their own ILLs in the OPAC

To reproduce:
- Enable the ILL module
- Install the FreeForm backend as described here:
  https://wiki.koha-community.org/wiki/ILL_backends
- Go to the ILL module and add two different ILL requests by
  clicking on "New ILL request" and entering the necessary details.
- Make sure you connect the two requests to two *different* patrons
  in the field marked "Card number, username or surname"
- Make the two titles different, and make a not of which title is
  connected to which patron
- Log in as one of the two patrons who now have an ILL request each,
  in the OPAC
- Go to the "Interlibrary loan requests" tab
- Click on "View" for the request connected to this patron. The URL
  will look like something like this:
  http://<opac>/cgi-bin/koha/opac-illrequests.pl?method=view&illrequest_id=2
- Now change the number at the end to correspond to the the ILL request
  connected to the *other* patron
- Verify you can see the details of an ILL request conncted to another
  patron than the patron you are logged in as

To test:
- Apply the patch
- Restart all the things if you are testing with ktd
- Reload the detail view of the ILL request that belongs to the patron
  you are not logged in as
- Verify you are redirect to the 404 page and can not see the details
  of the request that belongs to the patron you are not logged in as

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
opac/opac-illrequests.pl