Bug 36838: Add CSRF token to tags review AJAX requests
authorOwen Leonard <oleonard@myacpl.org>
Mon, 13 May 2024 13:46:03 +0000 (13:46 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Mon, 13 May 2024 14:24:18 +0000 (16:24 +0200)
commitaae125044d78f9f1a71bdc229b029db585422890
treedea9432f4f5902ea9ea633d29662f7af0ae97817
parent43eb61f0d80cf69a90e08ed877491a432b7c7f04
Bug 36838: Add CSRF token to tags review AJAX requests

The JavaScript for approving or rejecting tags in the staff interface's
tag review interface lacked a CSRF token for the POSTed requests. This
patch adds the token for "approve" and "reject" operations.

To test, apply the patch and clear your browser cache if necessary.

- If necessary, enable tags in system preferences.
- Log in to the OPAC and submit multiple tags on various records.
- In the staff interface, go to Tools -> Tags.
- Test the process of approving and rejecting tags by clicking the
  buttons in each row of the table of tags.
- The browser console should show no errors, and the lists of approved
  and rejected tags should correctly show the tags you moderated.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js