|
Lines 156-161
sub get_availability {
Link Here
|
| 156 |
my $user = $c->stash('koha.user'); |
156 |
my $user = $c->stash('koha.user'); |
| 157 |
|
157 |
|
| 158 |
my $patron = Koha::Patrons->find( $c->param('patron_id') ); |
158 |
my $patron = Koha::Patrons->find( $c->param('patron_id') ); |
|
|
159 |
|
| 160 |
if ( $c->stash('is_public') && ( $user->id ne $patron->id ) ) { |
| 161 |
my $error = { error => 'Unauthorized', error_code => 'UNAUTHORIZED' }; |
| 162 |
return $c->render( status => 403, openapi => $error ); |
| 163 |
} |
| 164 |
|
| 159 |
my $item = Koha::Items->find( $c->param('item_id') ); |
165 |
my $item = Koha::Items->find( $c->param('item_id') ); |
| 160 |
|
166 |
|
| 161 |
my ( $impossible, $confirmation, $warnings ) = |
167 |
my ( $impossible, $confirmation, $warnings ) = |
| 162 |
- |
|
|