Bug 31378: Add manage_authentication_providers permission

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>
This commit is contained in:
Tomás Cohen Arazi 2022-08-30 10:16:44 -03:00
parent 8434183d40
commit f3a4e312e2
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
3 changed files with 16 additions and 0 deletions

View file

@ -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` (

View 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'),

View file

@ -830,5 +830,11 @@
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 -%]