https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41921
--- Comment #21 from Kyle M Hall (khall) <[email protected]> --- Created attachment 199317 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199317&action=edit Bug 41921: Wire check_limits into svc/report and opac/svc/report * svc/report calls Koha::Reports->check_limits before prep_report, passing the logged-in patron's borrowernumber. Returns a 429 if the limits have been exceeded. * opac/svc/report does the same, but with borrowernumber from the userenv when present (anonymous OPAC requests still count toward the per-instance limit). * Update error keys for consistency Test plan 1) Apply patch, restart all the things 2) prove t/db_dependent/Koha/Reports.t 3) Set total_running_reports_per_instance_limit to 1 in koha-conf.xml 4) Start a long report through the staff UI ( e.g. "SELECT SLEEP(120)" ) 5) Browse to /cgi-bin/koha/svc/report?id=N (while authenticated) and confirm the response is 429 with body {"error":"total_running_reports_per_instance_limit_exceeded"} 6) Browse to /cgi-bin/koha/opac/svc/report?id=N (while logged out) and confirm the same 429 response 7) Reset the limit 8) Repeat steps 4-6 9) Confirm normal JSON results -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
