From 69e7d23dca7be7b9c6429a29e531b00e6d02327c Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Wed, 28 Feb 2024 10:39:35 +0200 Subject: [PATCH 1/4] Bug 36135: Add new permission batch_modify_holds This patch adds new permission "batch_modify_holds". To test: 1. Apply this patch. 2. Run updatedatabase.pl. 3. Check that new permission was added to Patrons->Set permissions. Sponsored-by: Koha-Suomi Oy --- installer/data/mysql/atomicupdate/bug_36135.pl | 14 ++++++++++++++ installer/data/mysql/mandatory/userpermissions.sql | 1 + .../intranet-tmpl/prog/en/includes/permissions.inc | 5 +++++ 3 files changed, 20 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_36135.pl diff --git a/installer/data/mysql/atomicupdate/bug_36135.pl b/installer/data/mysql/atomicupdate/bug_36135.pl new file mode 100755 index 0000000000..4bd58cbac7 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_36135.pl @@ -0,0 +1,14 @@ +use Modern::Perl; + +return { + bug_number => "36135", + description => "Add new permission batch_modify_holds", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{INSERT IGNORE permissions (module_bit, code, description) VALUES (13, 'batch_modify_holds', 'Perform batch modification of holds')}); + + say $out "Added new permission 'batch_modify_holds'"; + }, +}; diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql index 729c075548..70ab856377 100644 --- a/installer/data/mysql/mandatory/userpermissions.sql +++ b/installer/data/mysql/mandatory/userpermissions.sql @@ -104,6 +104,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES (13, 'edit_patrons', 'Perform batch modification of patrons'), (13, 'delete_anonymize_patrons', 'Delete old borrowers and anonymize circulation history (deletes borrower checkout history)'), (13, 'batch_extend_due_dates', 'Perform batch extend due dates'), + (13, 'batch_modify_holds', 'Perform batch modification of holds'), (13, 'batch_upload_patron_images', 'Upload patron images in a batch or one at a time'), (13, 'schedule_tasks', 'Schedule tasks to run'), (13, 'items_batchmod', 'Perform batch modification of items'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc index 742e6e1c35..0f31798f18 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -512,6 +512,11 @@ Perform batch extend due dates ([% name | html %]) + [%- CASE 'batch_modify_holds' -%] + + Perform batch modification of holds + + ([% name | html %]) Define days when the library is closed -- 2.34.1