From 9e88e1d8e8d7f838d15475c13853ca5334642de9 Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Wed, 28 Feb 2024 10:39:35 +0200 Subject: [PATCH 01/14] 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 | 16 ++++++++++++++++ .../data/mysql/mandatory/userpermissions.sql | 1 + .../prog/en/includes/permissions.inc | 5 +++++ 3 files changed, 22 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..40aa318e1e --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_36135.pl @@ -0,0 +1,16 @@ +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 1d8b7d034f..17b62824db 100644 --- a/installer/data/mysql/mandatory/userpermissions.sql +++ b/installer/data/mysql/mandatory/userpermissions.sql @@ -111,6 +111,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 4ca590e4b8..59b50f23b8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -365,6 +365,11 @@ [%- CASE 'batch_extend_due_dates' -%] 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 ([% name | html %]) -- 2.34.1