From c0ed254f8981d196efc278323f370dee039e97de Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 22 Jan 2020 10:26:00 +0000 Subject: [PATCH] Bug 24477: Require `takepayment` permission in pos/pay.pl When adding the point of sale take payment page in bug 23354 we missed the permission check script side along with adding the permission at install time (update was caught). --- installer/data/mysql/userpermissions.sql | 1 + pos/pay.pl | 1 + 2 files changed, 2 insertions(+) diff --git a/installer/data/mysql/userpermissions.sql b/installer/data/mysql/userpermissions.sql index ab46391bdc..38c734d9ff 100644 --- a/installer/data/mysql/userpermissions.sql +++ b/installer/data/mysql/userpermissions.sql @@ -121,4 +121,5 @@ INSERT INTO permissions (module_bit, code, description) VALUES (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') ; diff --git a/pos/pay.pl b/pos/pay.pl index 3d9956f8a5..1f56af1d7f 100755 --- a/pos/pay.pl +++ b/pos/pay.pl @@ -26,6 +26,7 @@ my ( $template, $loggedinuser, $cookie, $user_flags ) = get_template_and_user( query => $q, type => 'intranet', authnotrequired => 0, + flagsrequired => { cash_management => 'takepayment' }, } ); my $logged_in_user = Koha::Patrons->find($loggedinuser) or die "Not logged in"; -- 2.20.1