View | Details | Raw Unified | Return to bug 28907
Collapse All | Expand All

(-)a/Koha/REST/V1/Checkouts.pm (-1 / +10 lines)
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 ) =
(-)a/api/v1/swagger/paths/checkouts.yaml (-3 lines)
Lines 447-451 Link Here
447
        description: Under maintenance
447
        description: Under maintenance
448
        schema:
448
        schema:
449
          $ref: "../swagger.yaml#/definitions/error"
449
          $ref: "../swagger.yaml#/definitions/error"
450
    x-koha-authorization:
451
      allow-owner: true
452
- 

Return to bug 28907