From 24b4fdebf050d7c95e81ce1fc5707b8a42efaacf Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 16 Mar 2020 11:45:15 +0100 Subject: [PATCH] Bug 24846: Add new permission batch_extend_due_dates Signed-off-by: Bernardo Gonzalez Kriegel Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson Signed-off-by: Lucas Gass (cherry picked from commit bb6c483a245a229a77c6726ddebb2f4484f6c2a0) Signed-off-by: Hayley Mapley --- installer/data/mysql/atomicupdate/bug_24846.perl | 11 +++++++++++ installer/data/mysql/userpermissions.sql | 1 + .../intranet-tmpl/prog/en/includes/permissions.inc | 1 + 3 files changed, 13 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_24846.perl diff --git a/installer/data/mysql/atomicupdate/bug_24846.perl b/installer/data/mysql/atomicupdate/bug_24846.perl new file mode 100644 index 0000000000..cdf4f7587e --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_24846.perl @@ -0,0 +1,11 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do(qq{ + INSERT IGNORE permissions (module_bit, code, description) + VALUES + (13, 'batch_extend_due_dates', 'Perform batch extend due dates') + }); + + SetVersion($DBversion); + print "Upgrade to $DBversion done (Bug 24846 - Add a new permission for new tool batch extend due dates)\n"; +} diff --git a/installer/data/mysql/userpermissions.sql b/installer/data/mysql/userpermissions.sql index b9ee7bb7d4..f342b4f522 100644 --- a/installer/data/mysql/userpermissions.sql +++ b/installer/data/mysql/userpermissions.sql @@ -71,6 +71,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES (13, 'import_patrons', 'Import patron data'), (13, 'edit_patrons', 'Perform batch modification of patrons'), (13, 'delete_anonymize_patrons', 'Delete old borrowers and anonymize circulation history (deletes borrower reading history)'), + (13, 'batch_extend_due_dates', 'Perform batch extend due dates'), (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 d7fff59151..947c5bf5f2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -140,6 +140,7 @@ [%- CASE 'edit_templates' -%]Create and edit club templates [%- CASE 'enroll' -%]Enroll patrons in clubs [%- CASE 'edi_manage' -%]Manage EDIFACT transmissions + [%- CASE 'batch_extend_due_dates' -%]Perform batch extend due dates [%# self_check %] [%- CASE 'self_checkin_module' -%]Log into the self check-in module. Note: this permission prevents the patron from using any other OPAC functionality [%- CASE 'self_checkout_module' -%]Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID -- 2.39.5