Bugzilla – Attachment 182077 Details for
Bug 39848
Users without edit_catalogue permission can delete the record if no items remain from the batch item deletion tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39848: Restrict record deletion to staff who have edit_catalogue permission
Bug-39848-Restrict-record-deletion-to-staff-who-ha.patch (text/plain), 2.42 KB, created by
Martin Renvoize (ashimema)
on 2025-05-08 12:34:55 UTC
(
hide
)
Description:
Bug 39848: Restrict record deletion to staff who have edit_catalogue permission
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-05-08 12:34:55 UTC
Size:
2.42 KB
patch
obsolete
>From aa6c547745bff1d029de40bca6647f8d405e72b0 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >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 <roman.dolny@jezuici.pl> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > .../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 3a652d1d86e..79a45fdc0ca 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 @@ > <input type="hidden" name="op" value="[% op | html %]" /> > <p>This will delete [% IF ( too_many_items_display ) %]all the[% ELSE %]the selected[% END %] items.</p> > <input type="hidden" name="del" value="1" /> >- <input type="checkbox" name="del_records" id="del_records" /> <label for="del_records">Delete records if no items remain.</label> >+ [% IF ( CAN_user_editcatalogue_edit_catalogue ) %] >+ <input type="checkbox" name="del_records" id="del_records" /> >+ <label for="del_records">Delete records if no items remain.</label> >+ [% END %] > > <fieldset class="action"> > [% IF too_many_items_display %] >-- >2.49.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39848
:
182010
|
182030
| 182077