Bug 31378: Add manage_authentication_providers permission
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 30 Aug 2022 13:16:44 +0000 (10:16 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 8 Nov 2022 17:31:10 +0000 (14:31 -0300)
Signed-off-by: Lukasz Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/atomicupdate/bug_31378.pl
installer/data/mysql/mandatory/userpermissions.sql
koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc

index 66d796d..915bd2f 100755 (executable)
@@ -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` (
index a48c523..78d06a9 100644 (file)
@@ -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'),
index e0329e4..d0ca376 100644 (file)
             Manage recalls for patrons
         </span>
         <span class="permissioncode">([% name | html %])</span>
+  [%# authentication_providers %]
+    [%- CASE 'manage_authentication_providers' -%]
+        <span class="sub_permission manage_authentication_providers_subpermission">
+            Manage authentication providers
+        </span>
+        <span class="permissioncode">([% name | html %])</span>
   [%- END -%]
 [%- END -%]