From 99e35ba32df0ad9cd311e5b854aff5b2024f77d0 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 17 Jun 2025 13:57:08 +0000 Subject: [PATCH] Bug 36135: Add batch_modify_holds 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 00000000000..40aa318e1ec --- /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 d5121c91fd2..768aa9cee18 100644 --- a/installer/data/mysql/mandatory/userpermissions.sql +++ b/installer/data/mysql/mandatory/userpermissions.sql @@ -112,6 +112,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 a0e17a2d418..e42fcf8e67d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -368,6 +368,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.39.5