[Bug 43312] New: Migrate opac-user.tt to use api-client.js for article request cancellation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43312 Bug ID: 43312 Summary: Migrate opac-user.tt to use api-client.js for article request cancellation Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 34451 Target Milestone: --- opac-user.tt uses raw jQuery.ajax() for DELETE calls to /api/v1/public/patrons/.../article_requests/.... This needs to be migrated to api-client.js for proper CSRF token handling (bug 34451). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43312 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34451 Depends on|34451 | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43312 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |tomascohen@gmail.com Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43312 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 203759 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203759&action=edit Bug 43312: Add CSRF header to opac-user.tt article request cancellation The OPAC does not have the api-client.js infrastructure yet. As a minimal fix, this adds the CSRF-TOKEN header manually to the jQuery.ajax DELETE call for cancelling article requests. The token is read from the csrf-token meta tag which is already present in the OPAC head. Test plan: 1. Apply patch 2. Log into the OPAC as a patron with an article request 3. Go to Your account > click cancel on an article request => SUCCESS: Request cancelled without 403 error 4. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43312 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Summary|Migrate opac-user.tt to use |Make opac-user.tt set the |api-client.js for article |CSRF header for article |request cancellation |request cancellation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43312 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43312 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #203759|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43312 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 203786 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203786&action=edit Bug 43312: Add CSRF header to opac-user.tt article request cancellation The OPAC does not have the api-client.js infrastructure yet. As a minimal fix, this adds the CSRF-TOKEN header manually to the jQuery.ajax DELETE call for cancelling article requests. The token is read from the csrf-token meta tag which is already present in the OPAC head. Test plan: 1. Apply patch 2. Log into the OPAC as a patron with an article request 3. Go to Your account > click cancel on an article request => SUCCESS: Request cancelled without 403 error 4. Sign off :-D Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org