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

(-)a/installer/data/mysql/updatedatabase.pl (-4 / +12 lines)
Lines 8485-8496 if ( CheckVersion($DBversion) ) { Link Here
8485
8485
8486
$DBversion = "XXX";
8486
$DBversion = "XXX";
8487
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
8487
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
8488
    $dbh->do("
8488
    $dbh->do(q{
8489
        INSERT IGNORE INTO permissions (module_bit, code, description)
8489
        INSERT IGNORE INTO permissions (module_bit, code, description)
8490
        VALUES (11, 'order_claim_for_all', 'Claim for all orders')
8490
        VALUES (11, 'order_claim_for_all', 'Claim for all orders')
8491
    ");
8491
    });
8492
8493
    # Add this new permission to all users that have 'order_receive' permission
8494
    $dbh->do(q{
8495
        INSERT INTO user_permissions (borrowernumber, module_bit, code)
8496
          SELECT borrowernumber, 11, 'order_claim_for_all'
8497
          FROM user_permissions
8498
          WHERE code = 'order_receive'
8499
          GROUP BY borrowernumber
8500
    });
8492
8501
8493
    print "Upgrade to $DBversion done (Add permission order_claim_for_all)\n";
8502
    print "Upgrade to $DBversion done (Bug 7292: Add permission order_claim_for_all)\n";
8494
    SetVersion($DBversion);
8503
    SetVersion($DBversion);
8495
}
8504
}
8496
8505
8497
- 

Return to bug 7292