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

(-)a/Koha/REST/V1/Auth.pm (-1 / +2 lines)
Lines 140-145 sub authenticate_api_request { Link Here
140
        if ($valid_token) {
140
        if ($valid_token) {
141
            my $patron_id   = Koha::ApiKeys->find( $valid_token->{client_id} )->patron_id;
141
            my $patron_id   = Koha::ApiKeys->find( $valid_token->{client_id} )->patron_id;
142
            my $patron      = Koha::Patrons->find($patron_id);
142
            my $patron      = Koha::Patrons->find($patron_id);
143
            $c->stash('koha.user' => $patron);
144
143
            my $permissions = $authorization->{'permissions'};
145
            my $permissions = $authorization->{'permissions'};
144
            # Check if the patron is authorized
146
            # Check if the patron is authorized
145
            if ( haspermission($patron->userid, $permissions)
147
            if ( haspermission($patron->userid, $permissions)
146
- 

Return to bug 22071