|
Lines 465-470
sub _to_model {
Link Here
|
| 465 |
return $patron; |
465 |
return $patron; |
| 466 |
} |
466 |
} |
| 467 |
|
467 |
|
|
|
468 |
sub owner_authorization { |
| 469 |
my ($c, $method, $user, $auth_spec) = @_; |
| 470 |
|
| 471 |
if ($method eq 'guarantors_can_see_charges') { |
| 472 |
my $patron_id = $c->match->stack->[-1]->{'patron_id'}; |
| 473 |
return $user->borrowernumber == $patron_id ? 1 : 0; |
| 474 |
} |
| 475 |
elsif ($method eq 'guarantors_can_see_checkouts') { |
| 476 |
my $patron_id = $c->match->stack->[-1]->{'patron_id'}; |
| 477 |
return $user->borrowernumber == $patron_id ? 1 : 0; |
| 478 |
} |
| 479 |
|
| 480 |
return 0; |
| 481 |
} |
| 482 |
|
| 468 |
=head2 Global variables |
483 |
=head2 Global variables |
| 469 |
|
484 |
|
| 470 |
=head3 $to_api_mapping |
485 |
=head3 $to_api_mapping |