@@ -, +, @@ OAuth use case - Apply the tests patch: - Run: $ kshell k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t - Apply this patch - Run: k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t - Sign off =D --- Koha/REST/V1/Auth.pm | 2 ++ 1 file changed, 2 insertions(+) --- a/Koha/REST/V1/Auth.pm +++ a/Koha/REST/V1/Auth.pm @@ -140,6 +140,8 @@ sub authenticate_api_request { if ($valid_token) { my $patron_id = Koha::ApiKeys->find( $valid_token->{client_id} )->patron_id; my $patron = Koha::Patrons->find($patron_id); + $c->stash('koha.user' => $patron); + my $permissions = $authorization->{'permissions'}; # Check if the patron is authorized if ( haspermission($patron->userid, $permissions) --