Bug 30720: Batch action links in result list missing permission checks
authorKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 13 May 2022 10:25:27 +0000 (10:25 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 16 May 2022 21:20:09 +0000 (11:20 -1000)
commit7660861d40f68e0c60b9a144a6ddb490763d4c15
tree45296338443991d3e89375b770cbeea714467d2b
parentef0798162888fd1d2d2be92addccf249040d103c
Bug 30720: Batch action links in result list missing permission checks

In the staff interface you can select records for merging, batch editing,
and batch deleting from the result list. This fixes the code to check for
the specific batch edit records and batch delete records permissions, so
those actions are only shown if the user has the right permissions.
As there is no merge record permission yet, it's assumed that edit_cataloge is
needed as before (no change in behavior).

To test:
- Create a staff user with only catalogue and editcatalogue permissions.
- Do a search in the catalog of the staff interface
- Select a few records from result list to unlock the Edit button on top
- Verify it shows all three options: edit, delete and merge
- Apply patch
- Verfiy now only merging is shown
- Add the records_batchdel and records_batchmod permissions from the tools
  area one after another and verify the display changes accordingly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt