From 2e2f5657877a618b9c142aa22e8f0373c56baf87 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 21 Nov 2019 14:28:03 +0000 Subject: [PATCH] Bug 24080: Add account_payout permission --- installer/data/mysql/atomicupdate/bug_24080.perl | 7 +++++++ installer/data/mysql/userpermissions.sql | 1 + koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/installer/data/mysql/atomicupdate/bug_24080.perl b/installer/data/mysql/atomicupdate/bug_24080.perl index 4a040a2456..aefe3283a5 100644 --- a/installer/data/mysql/atomicupdate/bug_24080.perl +++ b/installer/data/mysql/atomicupdate/bug_24080.perl @@ -15,6 +15,13 @@ if ( CheckVersion($DBversion) ) { } ); + $dbh->do(qq{ + INSERT IGNORE permissions (module_bit, code, description) + VALUES + (10, 'payout', 'Perform account payout action') + }); + SetVersion($DBversion); + print "Upgrade to $DBversion done (Bug 24080 - Add accounts payout permission)\n"; print "Upgrade to $DBversion done (Bug 24080 - Add PAYOUT account_debit_type)\n"; } diff --git a/installer/data/mysql/userpermissions.sql b/installer/data/mysql/userpermissions.sql index 085024e78c..3fdbbf8e8e 100644 --- a/installer/data/mysql/userpermissions.sql +++ b/installer/data/mysql/userpermissions.sql @@ -43,6 +43,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 9, 'edit_items', 'Edit items'), ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'), ( 9, 'delete_all_items', 'Delete all items at once'), + (10, 'payout', 'Perform account payout action'), (10, 'writeoff', 'Write off fines and fees'), (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'), (11, 'currencies_manage', 'Manage currencies and exchange rates'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc index 606306caed..f42f93efb5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -299,6 +299,11 @@ Remaining permissions for managing fines and fees ([% name | html %]) + [%- CASE 'payout' -%] + + Payout credits to patrons + + ([% name | html %]) [%- CASE 'writeoff' -%] Write off fines and fees -- 2.20.1