]> git.evergreen-ils.org Git - Evergreen.git/commit
LP 1889628: SIP2 Patron Username Lookup
authorJason Stephenson <jason@sigio.com>
Wed, 12 Aug 2020 18:44:00 +0000 (14:44 -0400)
committerJason Stephenson <jason@sigio.com>
Fri, 28 Aug 2020 12:05:43 +0000 (08:05 -0400)
commitddce1ae2d3c6f838c3da441fe2377bf86b49ac95
tree68dcece2e17b3c88fead0c0e19b78ec3e7b61d62
parent02921c5c58791485a53ca3362624ae2d999eb8d0
LP 1889628: SIP2 Patron Username Lookup

Allow SIP2 clients to pass the username or barcode in the SIP2 Patron
Identifier field (AA).  This is useful for services, such as
Overdrive, that can send a patron's username.  It is easier for a
patron to remember their username rather than barcode, and this
unifies login for those patrons who use their username to login to the
OPAC.

To make this possible, we modify the OpenILS::SIP::Patron->new method
to accept a usrname key to retrieve patrons by usrname.

We also modify the OpenILS::SIP->find_patron method to accept a
usrname key to look up patrons.  The find_partron method is further
modified to check the patron id against the opac.barcode.regex in more or
less the same manner as the OPAC.

Two helper functions are added to OpenILS::SIP:

1. get_ou_setting: to retrieve org unit settings using the home_ou of
the logged in SIP2 account.

2. get_barcode_regex: To retrieve and cache the opac.barcode_regex
setting.

Testing this requires a working SIP2 installation and a knowledge of
the SIP protocols.  The easiest thing is to install the patch and see
if your SIP client can recognize a patron who has a username different
from their barcode by using both their barcode and then their
username.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
docs/RELEASE_NOTES_NEXT/SIP/allow_usrname_in_patron_id.adoc [new file with mode: 0644]