]> git.koha-community.org Git - koha.git/commit
Bug 24003: Make the API set userenv on authentication
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 5 Jun 2020 12:16:16 +0000 (09:16 -0300)
committerLucas Gass <lucas@bywatersolutions.com>
Wed, 17 Jun 2020 21:32:33 +0000 (21:32 +0000)
commit3d9d07d03bdfc8c18bb1595839dc9a8d2878ebc2
tree896bd36adb795c8ed8b0dfda8ec15417dbeadb8f
parenta2ef8f64c444d4e299e50975ddf3219153182e0a
Bug 24003: Make the API set userenv on authentication

This patch makes the authentication step stash the user that got
authenticated so code outside the Mojo part of Koha can use it (i.e.
through the use of C4::Context->userenv).

To test:
1. Apply the regression tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t \
           t/db_dependent/api/v1/auth_basic.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 682d7896dd8e91fe846221d9605f79ca44d16360)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/REST/V1/Auth.pm