From 9688209732e5e3498c6da5d2a1181fabfac11c64 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 11 Sep 2019 10:44:56 +0100 Subject: [PATCH] Bug 23354: Add permissions Sponsored-by: PTFS Europe Sponsored-by: Cheshire Libraries Shared Services Signed-off-by: Kyle M Hall Signed-off-by: Josef Moravec Signed-off-by: Martin Renvoize --- .../mysql/atomicupdate/bug_23354_permissions.perl | 13 +++++++++++++ .../intranet-tmpl/prog/en/includes/permissions.inc | 5 +++++ .../intranet-tmpl/prog/en/modules/intranet-main.tt | 2 ++ 3 files changed, 20 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_23354_permissions.perl diff --git a/installer/data/mysql/atomicupdate/bug_23354_permissions.perl b/installer/data/mysql/atomicupdate/bug_23354_permissions.perl new file mode 100644 index 0000000000..05b1d7d453 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_23354_permissions.perl @@ -0,0 +1,13 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if ( CheckVersion($DBversion) ) { + + $dbh->do(qq{ + INSERT IGNORE permissions (module_bit, code, description) + VALUES + (25, 'takepayment', 'Access the point of sale page and take payments') + }); + + + SetVersion($DBversion); + print "Upgrade to $DBversion done (Bug 23354 - Add point of sale permissions)\n"; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc index ff42562f64..b66d9bd400 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -691,5 +691,10 @@ Add, edit and archive cash registers ([% name | html %]) + [%- CASE 'takepayment' -%] + + Access the point of sale page and take payments + + ([% name | html %]) [%- END -%] [%- END -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt index b3e2910c6e..dcb632a936 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -80,9 +80,11 @@