https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44325 --- Comment #1 from Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> --- Created attachment 212763 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212763&action=edit Bug 44325: Do not load checkouts tables when the user lacks the required permissions This patch: - makes both services return a proper '403 Forbidden' response - does not display the checkouts table, the relatives' checkouts tab and the claims tab when the user is not allowed to fetch their content, and displays a message instead of the checkouts table Test plan: 1. Create a staff user with only 'catalogue' and 'borrowers > list_borrowers' 2. Set ClaimReturnedLostValue to any lost value 3. Log in with this user and go to the details page of a patron of the same library who has a checkout 4. Click "Show checkouts" => Error 500 (see the browser network tab for svc/checkouts) 5. Apply this patch, restart_all 6. Reload the page => A message says you do not have permission to view the details of the checkouts; the checkouts count is still displayed in the tab => The "Claims" and "Relatives' checkouts" tabs are not displayed 7. Go to a patron without checkouts => "Patron has nothing checked out." as before 8. Give the user 'circulate > circulate_remaining_permissions', reload => The checkouts table and the claims tab are displayed and load as before 9. Replace that permission with 'borrowers > edit_borrowers', reload => Same as 8. 10. As a superlibrarian, check circ/circulation.pl for the same patron => No change 11. Call /cgi-bin/koha/svc/checkouts?borrowernumber=X with the user of step 1 => 403 instead of 500 Sponsored-by: BibLibre -- You are receiving this mail because: You are watching all bug changes.