From 180e54a87141b2ec07c606eac58e442bbcb968ff 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 Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer (cherry picked from commit 0f70ec68c91031cd7d869ed685dc54101151ac4f) Signed-off-by: Fridolin Somers --- .../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 35bf47c286..e82c841a18 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 @@ -170,7 +170,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 %]