Koha/installer/data/mysql/db_revs/240600017.pl
Martin Renvoize 876332b676
Bug 13888: DBRev 24.06.00.017
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-22 10:28:02 +01:00

24 lines
993 B
Perl
Executable file

use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
return {
bug_number => "13888",
description => "'Lists' permission should allow/disallow using the lists module in staff",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
$dbh->do(
q{ INSERT IGNORE INTO permissions (module_bit,code,description) VALUES (20, 'use_public_lists', 'Use public lists') }
) == 1
? say_success( $out, "Added permission 'use_public_lists'" )
: say_info( $out, "Permission 'use_public_lists' already exists" );
$dbh->do(
q{ INSERT IGNORE INTO permissions (module_bit,code,description) VALUES (20, 'create_public_lists', 'Create public lists') }
) == 1
? say_success( $out, "Added permission 'create_public_lists'" )
: say_info( $out, "Permission 'create_public_lists' already exists" );
},
};