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

(-)a/installer/data/mysql/updatedatabase.pl (-4 / +12 lines)
Lines 8579-8590 if ( CheckVersion($DBversion) ) { Link Here
8579
8579
8580
$DBversion = "XXX";
8580
$DBversion = "XXX";
8581
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
8581
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
8582
    $dbh->do("
8582
    $dbh->do(q{
8583
        INSERT IGNORE INTO permissions (module_bit, code, description)
8583
        INSERT IGNORE INTO permissions (module_bit, code, description)
8584
        VALUES (11, 'order_claim_for_all', 'Claim for all orders')
8584
        VALUES (11, 'order_claim_for_all', 'Claim for all orders')
8585
    ");
8585
    });
8586
8587
    # Add this new permission to all users that have 'order_receive' permission
8588
    $dbh->do(q{
8589
        INSERT INTO user_permissions (borrowernumber, module_bit, code)
8590
          SELECT borrowernumber, 11, 'order_claim_for_all'
8591
          FROM user_permissions
8592
          WHERE code = 'order_receive'
8593
          GROUP BY borrowernumber
8594
    });
8586
8595
8587
    print "Upgrade to $DBversion done (Add permission order_claim_for_all)\n";
8596
    print "Upgrade to $DBversion done (Bug 7292: Add permission order_claim_for_all)\n";
8588
    SetVersion($DBversion);
8597
    SetVersion($DBversion);
8589
}
8598
}
8590
8599
8591
- 

Return to bug 7292