[Koha-bugs] [Bug 18205] REST interface to Koha::Logger

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Apr 8 21:03:12 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18205

--- Comment #22 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 87545
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87545&action=edit
[UGLY FIX] Bug 18205: Set userenv in
Koha::REST::V1::Auth::authenticate_api_request

Koha code (like C4::Log::logaction) relies on C4::Context::userenv to be
set. This could be fixed in many ways. The easiest way is to set that
environmental variables after authorization happens.

I don't think this is a good design, but I'm not sure adding a new param
to logaction is the best option.

I'd rather make the action_logs table another target for Log4Perl at
some point. But I strongly disagree on making tiny enhancements be
required to refactor all the things :-D

I drop this code here for others to weight in.

Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list