Bug 6898 - circulation librarians can't run overdues without reports permissions followup
Better update database. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This commit is contained in:
parent
c31ebb9a33
commit
7afc07bfaa
|
|
@ -6225,7 +6225,19 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
|
|||
|
||||
$DBversion = "3.10.05.002";
|
||||
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
|
||||
$dbh->do("INSERT INTO permissions ( module_bit, code, description ) VALUES ( '1', 'overdues_report', 'Execute overdue items report' )");
|
||||
$dbh->do(q{
|
||||
INSERT INTO permissions ( module_bit, code, description )
|
||||
VALUES ( '1', 'overdues_report', 'Execute overdue items report' )
|
||||
});
|
||||
# add new permission for users with all report permissions and circulation remaining permission
|
||||
my $sth = $dbh->prepare(q{
|
||||
INSERT INTO user_permissions (borrowernumber, module_bit, code)
|
||||
SELECT user_permissions.borrowernumber, 1, 'overdues_report'
|
||||
FROM user_permissions
|
||||
LEFT JOIN borrowers USING(borrowernumber)
|
||||
WHERE borrowers.flags & (1 << 16)
|
||||
AND user_permissions.code = 'circulate_remaining_permissions'
|
||||
});
|
||||
print "Upgrade to $DBversion done ( Add circ permission overdues_report )\n";
|
||||
SetVersion($DBversion);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue