Bug 7651: DBRev 18.06.00.007
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
cb93ae3c56
commit
90977aef1e
3 changed files with 13 additions and 8 deletions
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.06.00.006";
|
||||
$VERSION = "18.06.00.007";
|
||||
|
||||
sub version {
|
||||
return $VERSION;
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
INSERT INTO permissions (module_bit, code, description) VALUES (11, 'currencies_manage', 'Manage currencies and exchange rates');
|
||||
|
||||
INSERT INTO user_permissions (borrowernumber, module_bit, code)
|
||||
SELECT borrowernumber, 11, 'currencies_manage' FROM borrowers WHERE flags & (1 << 3) OR borrowernumber IN
|
||||
(SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions');
|
||||
|
||||
-- Bug 7651: Add new permission currencies_manage and update staff users
|
|
@ -16143,6 +16143,18 @@ if( CheckVersion( $DBversion ) ) {
|
|||
print "Upgrade to $DBversion done (Bug 19524 - Share patron lists between staff)\n";
|
||||
}
|
||||
|
||||
$DBversion = '18.06.00.007';
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
$dbh->do( "INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (11, 'currencies_manage', 'Manage currencies and exchange rates');" );
|
||||
$dbh->do(q{
|
||||
INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code)
|
||||
SELECT borrowernumber, 11, 'currencies_manage' FROM borrowers WHERE flags & (1 << 3) OR borrowernumber IN
|
||||
(SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions');
|
||||
});
|
||||
SetVersion( $DBversion );
|
||||
print "Upgrade to $DBversion done (Bug 7651 - Add separate permission for managing currencies and exchange rates)\n";
|
||||
}
|
||||
|
||||
# SEE bug 13068
|
||||
# if there is anything in the atomicupdate, read and execute it.
|
||||
|
||||
|
|
Loading…
Reference in a new issue