From 047ca189de9d1dd70318d47671cb6059745582ec Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 29 Apr 2022 11:01:27 +0200 Subject: [PATCH] Bug 30650: Add new permission manage_curbside_pickups Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: Koha Team University Lyon 3 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug_30650.pl | 6 ++++++ installer/data/mysql/mandatory/userpermissions.sql | 1 + koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/installer/data/mysql/atomicupdate/bug_30650.pl b/installer/data/mysql/atomicupdate/bug_30650.pl index 982bb12536..3b186f93ca 100755 --- a/installer/data/mysql/atomicupdate/bug_30650.pl +++ b/installer/data/mysql/atomicupdate/bug_30650.pl @@ -94,5 +94,11 @@ return { VALUES ('CurbsidePickup', '0', NULL, 'Enable curbside pickup', 'YesNo') }); + + $dbh->do(qq{ + INSERT IGNORE permissions (module_bit, code, description) + VALUES + (3, 'manage_curbside_pickups', 'Manage curbside pickups') + }); } } diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql index 3a3f7f9b4e..b8037d162e 100644 --- a/installer/data/mysql/mandatory/userpermissions.sql +++ b/installer/data/mysql/mandatory/userpermissions.sql @@ -37,6 +37,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 3, 'manage_keyboard_shortcuts', 'Manage keyboard shortcuts for the advanced cataloging editor'), ( 3, 'manage_smtp_servers', 'Manage SMTP servers configuration'), ( 3, 'manage_background_jobs', 'Manage background jobs'), + ( 3, 'manage_curbside_pickups', 'Manage curbside pickups'), ( 4, 'delete_borrowers', 'Delete patrons'), ( 4, 'edit_borrowers', 'Add, modify and view patron information'), ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc index 3e70c155bc..bb635165d1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -273,6 +273,11 @@ Manage background jobs ([% name | html %]) + [%- CASE 'manage_curbside_pickups' -%] + + Manage curbside pickups + + ([% name | html %]) [%- CASE 'delete_borrowers' -%] Delete patrons -- 2.39.5