[Bug 43311] New: Migrate opac-memberentry.tt to use api-client.js
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43311 Bug ID: 43311 Summary: Migrate opac-memberentry.tt to use api-client.js 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-memberentry.tt uses raw jQuery.ajax() for PUT calls to /api/v1/public/patrons/.../guarantors/can_see_checkouts. 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=43311 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=43311 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=43311 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 203758 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203758&action=edit Bug 43311: Add CSRF header to opac-memberentry.tt API call 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 PUT call for updating guarantor checkout visibility. 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 a guarantor 3. Go to Your account > Personal details 4. Change the "Allow guarantor to see checkouts" setting => SUCCESS: Setting updated without 403 error 5. 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=43311 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Summary|Migrate opac-memberentry.tt |Make opac-memberentry.tt |to use api-client.js |set CSRF header -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43311 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=43311 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #203758|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=43311 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 203788 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203788&action=edit Bug 43311: Add CSRF header to opac-memberentry.tt API call 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 PUT call for updating guarantor checkout visibility. 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 a guarantor 3. Go to Your account > Personal details 4. Change the "Allow guarantor to see checkouts" setting => SUCCESS: Setting updated without 403 error 5. 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