|
Lines 337-342
sub cannot_be_transferred {
Link Here
|
| 337 |
if ( !Koha::Patrons->find($to) ) { |
337 |
if ( !Koha::Patrons->find($to) ) { |
| 338 |
return 'new_owner_not_found'; |
338 |
return 'new_owner_not_found'; |
| 339 |
} |
339 |
} |
|
|
340 |
my $to_patron = Koha::Patrons->find($to); |
| 341 |
|
| 342 |
if ( $self->public ) { |
| 343 |
return 'unauthorized_transfer' |
| 344 |
unless C4::Auth::haspermission( |
| 345 |
$to_patron->userid, |
| 346 |
{ |
| 347 |
lists => [ |
| 348 |
'create_public_lists', 'delete_public_lists', 'edit_public_list_contents', 'edit_public_lists' |
| 349 |
] |
| 350 |
} |
| 351 |
); |
| 352 |
} |
| 340 |
if ( !$self->public && !$shares->search( { borrowernumber => $to } )->count ) { |
353 |
if ( !$self->public && !$shares->search( { borrowernumber => $to } )->count ) { |
| 341 |
return 'new_owner_has_no_share'; |
354 |
return 'new_owner_has_no_share'; |
| 342 |
} |
355 |
} |
| 343 |
- |
|
|