From ac6a22acfd90c3aa182f34fafdf945a92726f9b3 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 6 May 2025 22:19:40 +0000 Subject: [PATCH] Bug 39848: Restrict record deletion to staff who have edit_catalogue permission MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To test, 1. Create a user with the following permissions: edit_any_item, edit_items, items_batchdel, items_batchmod. 2. When logged in as that user, use the batch item deletion tool to delete a few items. 3. Select “Delete records if no items remain” and “Delete selected items.” When the job has processed, notice that X item(s) deleted. X record(s) deleted. 4. APPLY PATCH 5. With the same user repeat step 2. 6. This time there should be no option to 'Delete records if no items remain'. 7. Give the same use the Edit catalog (Modify bibliographic/holdings data) (edit_catalogue) permission. 8. Make sure you can successfully delete a record using the 'Delete records if no items remain'. Signed-off-by: Roman Dolny --- .../intranet-tmpl/prog/en/modules/tools/batchMod-del.tt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt index 3a652d1d86..79a45fdc0c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt @@ -174,7 +174,10 @@

This will delete [% IF ( too_many_items_display ) %]all the[% ELSE %]the selected[% END %] items.

- + [% IF ( CAN_user_editcatalogue_edit_catalogue ) %] + + + [% END %]
[% IF too_many_items_display %] -- 2.39.5