Bug 24846: Add new permission batch_extend_due_dates
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 16 Mar 2020 10:45:15 +0000 (11:45 +0100)
committerHayley Mapley <hayleymapley@catalyst.net.nz>
Thu, 26 Mar 2020 21:27:47 +0000 (10:27 +1300)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bb6c483a245a229a77c6726ddebb2f4484f6c2a0)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

installer/data/mysql/atomicupdate/bug_24846.perl [new file with mode: 0644]
installer/data/mysql/userpermissions.sql
koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc

diff --git a/installer/data/mysql/atomicupdate/bug_24846.perl b/installer/data/mysql/atomicupdate/bug_24846.perl
new file mode 100644 (file)
index 0000000..cdf4f75
--- /dev/null
@@ -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";
+}
index b9ee7bb..f342b4f 100644 (file)
@@ -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'),
index d7fff59..947c5bf 100644 (file)
     [%- CASE 'edit_templates' -%]<span>Create and edit club templates</span>
     [%- CASE 'enroll' -%]<span>Enroll patrons in clubs</span>
     [%- CASE 'edi_manage' -%]<span>Manage EDIFACT transmissions</span>
+    [%- CASE 'batch_extend_due_dates' -%]<span>Perform batch extend due dates</span>
   [%# self_check %]
     [%- CASE 'self_checkin_module' -%]<span>Log into the self check-in module. Note: this permission prevents the patron from using any other OPAC functionality</span>
     [%- CASE 'self_checkout_module' -%]<span>Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID</span>