From f3a4e312e2aad5b3d95f09b8e23d806a745f91d4 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 30 Aug 2022 10:16:44 -0300 Subject: [PATCH] Bug 31378: Add manage_authentication_providers permission Signed-off-by: Lukasz Koszyk Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug_31378.pl | 9 +++++++++ installer/data/mysql/mandatory/userpermissions.sql | 1 + koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/installer/data/mysql/atomicupdate/bug_31378.pl b/installer/data/mysql/atomicupdate/bug_31378.pl index 66d796ddeb..915bd2fef9 100755 --- a/installer/data/mysql/atomicupdate/bug_31378.pl +++ b/installer/data/mysql/atomicupdate/bug_31378.pl @@ -8,6 +8,15 @@ return { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; + # Add new permission + $dbh->do(qq{ + INSERT IGNORE permissions (module_bit, code, description) + VALUES + ( 3, 'manage_authentication_providers', 'Manage authentication providers') + }); + + say $out "manage_authentication_providers permission added"; + unless (TableExists('auth_providers')) { $dbh->do(q{ CREATE TABLE `auth_providers` ( diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql index a48c52373c..78d06a9f2f 100644 --- a/installer/data/mysql/mandatory/userpermissions.sql +++ b/installer/data/mysql/mandatory/userpermissions.sql @@ -41,6 +41,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 3, 'manage_background_jobs', 'Manage background jobs'), ( 3, 'manage_curbside_pickups', 'Manage curbside pickups'), ( 3, 'manage_search_filters', 'Manage custom search filters'), + ( 3, 'manage_authentication_providers', 'Manage authentication providers'), ( 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 e0329e4714..d0ca3769b7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -830,5 +830,11 @@ Manage recalls for patrons ([% name | html %]) + [%# authentication_providers %] + [%- CASE 'manage_authentication_providers' -%] + + Manage authentication providers + + ([% name | html %]) [%- END -%] [%- END -%] -- 2.39.5