|
Line 0
Link Here
|
| 0 |
- |
1 |
use Modern::Perl; |
|
|
2 |
use Koha::Installer::Output qw(say_warning say_failure say_success say_info); |
| 3 |
|
| 4 |
return { |
| 5 |
bug_number => "Bug_37144", |
| 6 |
description => "Add a subpermission for hiding patron contact information", |
| 7 |
up => sub { |
| 8 |
my ($args) = @_; |
| 9 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
| 10 |
|
| 11 |
# Do you stuffs here |
| 12 |
$dbh->do(q{ |
| 13 |
INSERT IGNORE permissions (module_bit, code, description) VALUES (4, 'view_contact_information', 'View patron contact information') |
| 14 |
}); |
| 15 |
|
| 16 |
$dbh->do(q{ |
| 17 |
INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code) |
| 18 |
SELECT borrowernumber, 4, 'view_contact_information' FROM borrowers WHERE borrowernumber IN ( SELECT borrowernumber FROM user_permissions WHERE code = 'edit_borrowers') |
| 19 |
}); |
| 20 |
|
| 21 |
# permissions |
| 22 |
say $out "Added new permission 'view_contact_information'"; |
| 23 |
|
| 24 |
|
| 25 |
}, |
| 26 |
}; |