From 55e1793f6bee24533fe4ce95c0c225c3e5311888 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Fri, 13 May 2022 10:25:27 +0000 Subject: [PATCH] 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. --- .../intranet-tmpl/prog/en/modules/catalogue/results.tt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index cde3f0f090..0e550fd353 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -175,11 +175,17 @@ + [% IF ( CAN_user_tools_records_batchmod || CAN_user_tools_records_batchdel || CAN_user_editcatalogue_edit_catalogue ) %] + [% END %] [% END %] -- 2.30.2