View | Details | Raw Unified | Return to bug 30335
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_30335.pl (-4 / +13 lines)
Lines 1-15 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
2
3
return {
3
return {
4
    bug_number => "30335",
4
    bug_number  => "30335",
5
    description => "Add manual_invoice and manual_credit permissions",
5
    description => "Add manual_invoice and manual_credit permissions",
6
    up => sub {
6
    up          => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        $dbh->do(q{
9
        $dbh->do(q{
10
            INSERT IGNORE permissions (module_bit, code, description) VALUES
10
            INSERT IGNORE permissions (module_bit, code, description) VALUES
11
            (10, 'manual_credit', 'Add manual credits to a patron account'),
11
            (10, 'manual_credit', 'Add manual credits to a patron account'),
12
            (10, 'manual_invoice', 'Add manual invoices to a patron account')
12
            (10, 'manual_invoice', 'Add manual invoices to a patron account')
13
        });
13
        });
14
15
        $dbh->do(q{
16
            INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code)
17
            SELECT borrowernumber, 10, 'manual_credit' FROM user_permissions WHERE code = 'remaining_permissions'
18
        });
19
20
        $dbh->do(q{
21
            INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code)
22
            SELECT borrowernumber, 10, 'manual_invoice' FROM user_permissions WHERE code = 'remaining_permissions'
23
        });
14
    },
24
    },
15
};
25
};
16
- 

Return to bug 30335