Bug 15774: DBRev 18.12.00.022
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
0499a3bf2b
commit
eeaf59a31f
2
Koha.pm
2
Koha.pm
|
|
@ -29,7 +29,7 @@ use vars qw{ $VERSION };
|
|||
# - #4 : the developer version. The 4th number is the database subversion.
|
||||
# used by developers when the database changes. updatedatabase take care of the changes itself
|
||||
# and is automatically called by Auth.pm when needed.
|
||||
$VERSION = "18.12.00.021";
|
||||
$VERSION = "18.12.00.022";
|
||||
|
||||
sub version {
|
||||
return $VERSION;
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
$DBversion = 'XXX';
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
$dbh->do( q{
|
||||
INSERT IGNORE INTO permissions (module_bit,code,description)
|
||||
VALUES
|
||||
(3,'manage_additional_fields','Add, edit, or delete additional custom fields for baskets or subscriptions (also requires order_manage or edit_subscription permissions)')
|
||||
});
|
||||
$dbh->do( q{
|
||||
INSERT INTO user_permissions (borrowernumber, module_bit, code)
|
||||
SELECT borrowernumber, 3, 'manage_additional_fields' FROM borrowers WHERE borrowernumber IN (SELECT DISTINCT borrowernumber FROM user_permissions WHERE code = 'order_manage' OR code = 'edit_subscription');
|
||||
});
|
||||
$dbh->do( q{
|
||||
INSERT INTO user_permissions (borrowernumber, module_bit, code)
|
||||
SELECT borrowernumber, 3, 'manage_additional_fields' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM borrowers WHERE MOD(flags DIV POWER(2,11),2)=1 OR MOD(flags DIV POWER(2,15),2) =1);
|
||||
});
|
||||
SetVersion( $DBversion );
|
||||
print "Upgrade to $DBversion done (Bug 15774 - Add permission for managing additional fields)\n";
|
||||
}
|
||||
|
|
@ -17571,6 +17571,25 @@ if ( CheckVersion($DBversion) ) {
|
|||
print "Upgrade to $DBversion done (Bug 20912 - Support granular rental charges)\n";
|
||||
}
|
||||
|
||||
$DBversion = '18.12.00.022';
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
$dbh->do( q{
|
||||
INSERT IGNORE INTO permissions (module_bit,code,description)
|
||||
VALUES
|
||||
(3,'manage_additional_fields','Add, edit, or delete additional custom fields for baskets or subscriptions (also requires order_manage or edit_subscription permissions)')
|
||||
});
|
||||
$dbh->do( q{
|
||||
INSERT INTO user_permissions (borrowernumber, module_bit, code)
|
||||
SELECT borrowernumber, 3, 'manage_additional_fields' FROM borrowers WHERE borrowernumber IN (SELECT DISTINCT borrowernumber FROM user_permissions WHERE code = 'order_manage' OR code = 'edit_subscription');
|
||||
});
|
||||
$dbh->do( q{
|
||||
INSERT INTO user_permissions (borrowernumber, module_bit, code)
|
||||
SELECT borrowernumber, 3, 'manage_additional_fields' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM borrowers WHERE MOD(flags DIV POWER(2,11),2)=1 OR MOD(flags DIV POWER(2,15),2) =1);
|
||||
});
|
||||
SetVersion( $DBversion );
|
||||
print "Upgrade to $DBversion done (Bug 15774 - Add permission for managing additional fields)\n";
|
||||
}
|
||||
|
||||
# SEE bug 13068
|
||||
# if there is anything in the atomicupdate, read and execute it.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue