From dca2e3442eb4426a9b2397809f7be5077f84425e 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 --- .../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 e3faeddbba..c79409ad36 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -676,5 +676,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 5fab3f0e05..9873bd674c 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 @@