|
Lines 153-159
sub get_availability {
Link Here
|
| 153 |
my $c = shift->openapi->valid_input or return; |
153 |
my $c = shift->openapi->valid_input or return; |
| 154 |
my $user = $c->stash('koha.user'); |
154 |
my $user = $c->stash('koha.user'); |
| 155 |
|
155 |
|
| 156 |
my $patron = Koha::Patrons->find( $c->param('patron_id') ); |
156 |
my $patron_id = $c->param('patron_id'); |
|
|
157 |
|
| 158 |
return if try { |
| 159 |
$c->auth->public($patron_id) if $c->stash('is_public'); |
| 160 |
return 0; # authorization successful, do not "return" after try-catch |
| 161 |
} catch { |
| 162 |
return $c->unhandled_exception($_); |
| 163 |
}; |
| 164 |
|
| 165 |
my $patron = Koha::Patrons->find($patron_id); |
| 157 |
my $item = Koha::Items->find( $c->param('item_id') ); |
166 |
my $item = Koha::Items->find( $c->param('item_id') ); |
| 158 |
|
167 |
|
| 159 |
my ( $impossible, $confirmation, $warnings ) = |
168 |
my ( $impossible, $confirmation, $warnings ) = |