From ed9ef325d7fda2a349a269173b02753db468ba0b Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 22 Jan 2020 14:41:21 +0000 Subject: [PATCH] Bug 24481: Move manage_cash_registers to parameters permission This patch moves the manage_cash_registers subpermission to the more appropriate location under 'parameters'. --- installer/data/mysql/atomicupdate/bug_24481.perl | 15 +++++++++++++++ installer/data/mysql/userpermissions.sql | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_24481.perl diff --git a/installer/data/mysql/atomicupdate/bug_24481.perl b/installer/data/mysql/atomicupdate/bug_24481.perl new file mode 100644 index 0000000000..3816e7c122 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_24481.perl @@ -0,0 +1,15 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + $dbh->do(qq{ + UPDATE + `permissions` + SET + `module_bit` = 3 + WHERE + `code` = 'manage_cash_registers' + }); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 24481 - Move permission to correct module_bit)\n"; +} diff --git a/installer/data/mysql/userpermissions.sql b/installer/data/mysql/userpermissions.sql index 4fbea09b2b..368849b62d 100644 --- a/installer/data/mysql/userpermissions.sql +++ b/installer/data/mysql/userpermissions.sql @@ -17,6 +17,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 3, 'manage_patron_attributes', 'Manage extended patron attributes'), ( 3, 'manage_transfers', 'Manage library transfer limits and transport cost matrix'), ( 3, 'manage_item_circ_alerts', 'Manage item circulation alerts'), + ( 3, 'manage_cash_registers', 'Add and remove cash registers'), ( 3, 'manage_cities', 'Manage cities and towns'), ( 3, 'manage_marc_frameworks', 'Manage MARC bibliographic and authority frameworks'), ( 3, 'manage_classifications', 'Manage classification sources'), @@ -120,6 +121,5 @@ INSERT INTO permissions (module_bit, code, description) VALUES (23, 'self_checkout_module', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID'), (24, 'manage_rotas', 'Create, edit and delete rotas'), (24, 'manage_rota_items', 'Add and remove items from rotas'), - (25, 'manage_cash_registers', 'Add and remove cash registers'), (25, 'takepayment', 'Access the point of sale page and take payments') ; -- 2.20.1