Bugzilla – Attachment 105588 Details for
Bug 24003
REST API should set C4::Context->userenv
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24003: (follow-up) Move interface setting to a more readable place
Bug-24003-follow-up-Move-interface-setting-to-a-mo.patch (text/plain), 1.52 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-06-05 12:49:46 UTC
(
hide
)
Description:
Bug 24003: (follow-up) Move interface setting to a more readable place
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-06-05 12:49:46 UTC
Size:
1.52 KB
patch
obsolete
>From a1e914dafbc946b90988f2aa24f9ffe7109c4f4c Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 5 Jun 2020 09:47:47 -0300 >Subject: [PATCH] Bug 24003: (follow-up) Move interface setting to a more > readable place > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/REST/V1/Auth.pm | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/Koha/REST/V1/Auth.pm b/Koha/REST/V1/Auth.pm >index b0966868b9f..8e9336a9e0a 100644 >--- a/Koha/REST/V1/Auth.pm >+++ b/Koha/REST/V1/Auth.pm >@@ -182,7 +182,6 @@ sub authenticate_api_request { > if ($valid_token) { > my $patron_id = Koha::ApiKeys->find( $valid_token->{client_id} )->patron_id; > $user = Koha::Patrons->find($patron_id); >- C4::Context->interface('api'); > } > else { > # If we have "Authorization: Bearer" header and oauth authentication >@@ -199,7 +198,6 @@ sub authenticate_api_request { > ); > } > $user = $c->_basic_auth( $authorization_header ); >- C4::Context->interface('api'); > unless ( $user ) { > # If we have "Authorization: Basic" header and authentication > # failed, do not try other authentication means >@@ -248,6 +246,7 @@ sub authenticate_api_request { > } > > $c->stash('koha.user' => $user); >+ C4::Context->interface('api'); > > if ( $user and !$cookie_auth ) { # cookie-auth sets this and more, don't mess with that > C4::Context->_new_userenv( $user->borrowernumber ); >-- >2.27.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24003
:
95228
|
95230
|
105579
|
105580
|
105581
|
105586
|
105587
|
105588
|
105633
|
105634
|
105635
|
105666
|
105844
|
105845
|
105846
|
105847
|
106087
|
106088
|
106089
|
106090