Bug 16492 - Checkouts ( and possibly checkins and other actions ) will use the patron...
commit90307bcbfaf4c2c8907be94eabca249ac173442e
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 10 May 2016 16:36:03 +0000 (10 16:36 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 10 Jun 2016 17:31:19 +0000 (10 17:31 +0000)
tree50ec3e13f9003a93e94b72a331ac0e7ac546302c
parentf17897fb105fccb7edbf60b24c7d6e5362351cb2
Bug 16492 - Checkouts ( and possibly checkins and other actions ) will use the patron home branch as the logged in library

Bug 14507 introduced the use of checkpw in C4::SIP::ILS::Patron so that
non-Koha internal authentication processes would be able to function via
SIP ( LDAP et al ).

The problem is that checkpw changes the userenv to that of the patron!
This is not usually an issue in Koha because most of the time that
patron running through checkpw is the one to be logged in.

Aside from SIP2 the only other area where this may be an issue is in SCO
when using SelfCheckoutByLogin.

Test Plan:
1) On master, check out an item to a patron via SIP2
2) Note the checkout lists the item as having been checked out
   from the patron's home library not matter which library is was
   supposed to be checked out from.
3) Apply this patch
4) Re-checkout the item
5) The item should now be checked out as if it was checked out from
   the library as defined in the SIP configuration file.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Auth.pm
C4/SIP/ILS/Patron.pm
t/db_dependent/Auth.t