Commit ed236435 authored by Benjamin Rokseth's avatar Benjamin Rokseth
Browse files

koha: Add session middleware override for C4::Auth::check_api_auth

parent 858b762c
......@@ -109,6 +109,12 @@ sub call {
return "failed";
};
local *{C4::Auth::check_api_auth} = sub {
if (my $auth = $session->param("auth")) {
$auth->{user}->{userid} and return ok => $session;
}
return "failed";
};
# TODO override all context methods?
local *{C4::Context::userenv} = sub { $session };
#local *{C4::Context::set_userenv} = sub { };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment