@@ -, +, @@ users with the claim_serials permission --- installer/data/mysql/updatedatabase.pl | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -8560,6 +8560,15 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.15.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + my $borrowernumbers = $dbh->selectcol_arrayref("SELECT DISTINCT borrowernumber FROM user_permissions WHERE module_bit=15 AND code='claim_serials'"); + my $sth = $dbh->prepare("INSERT INTO user_permissions(borrowernumber, module_bit, code) VALUES (?, 15, 'superserials')"); + $sth->execute( $_ ) for @$borrowernumbers; + print "Upgrade to $DBversion done (Bug 8438 - Set the superserials permission for all users with the claim_serials permission.)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --