Bug 30335: (follow-up) Ensure existing users remain permitted
This patch updates the database update to ensure users with the 'remaining_permissions' subpermission of 'updatecharges' continue to be able to manually invoice and manually credit borrower accounts after the patch is applied. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
2954fbc9cc
commit
1bbc53f65f
|
|
@ -1,15 +1,25 @@
|
|||
use Modern::Perl;
|
||||
|
||||
return {
|
||||
bug_number => "30335",
|
||||
bug_number => "30335",
|
||||
description => "Add manual_invoice and manual_credit permissions",
|
||||
up => sub {
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ($dbh, $out) = @$args{qw(dbh out)};
|
||||
my ( $dbh, $out ) = @$args{qw(dbh out)};
|
||||
$dbh->do(q{
|
||||
INSERT IGNORE permissions (module_bit, code, description) VALUES
|
||||
(10, 'manual_credit', 'Add manual credits to a patron account'),
|
||||
(10, 'manual_invoice', 'Add manual invoices to a patron account')
|
||||
});
|
||||
|
||||
$dbh->do(q{
|
||||
INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code)
|
||||
SELECT borrowernumber, 10, 'manual_credit' FROM user_permissions WHERE code = 'remaining_permissions'
|
||||
});
|
||||
|
||||
$dbh->do(q{
|
||||
INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code)
|
||||
SELECT borrowernumber, 10, 'manual_invoice' FROM user_permissions WHERE code = 'remaining_permissions'
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue