From: Jason Boyer Date: Fri, 6 May 2016 18:08:48 +0000 (-0400) Subject: LP1259196: Use Location as Workstation on Login X-Git-Tag: sprint4-merge-nov22~124 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f5867b209304ecaf25ce94bf538299d9d15cc34e;p=working%2FEvergreen.git LP1259196: Use Location as Workstation on Login When using a SIPServer with LP1579144 applied, use the Location (CP) field of the Login (93) message as a workstation name. This allows you to determine which selfcheck performed which circulation. Signed-off-by: Jason Boyer Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm index cf98f33e62..81307f4e5b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm @@ -241,19 +241,27 @@ sub login { } my $nonce = rand($$); - my $seed = $U->simplereq( + + my $seed = $U->simplereq( 'open-ils.auth', 'open-ils.auth.authenticate.init', $username, $nonce ); - my $response = $U->simplereq( - 'open-ils.auth', - 'open-ils.auth.authenticate.complete', - { - username => $username, - password => md5_hex($seed . md5_hex($password)), + my $opts = + { + username => $username, + password => md5_hex($seed . md5_hex($password)), type => 'opac', nonce => $nonce - } + }; + + if ($self->{login}->{location}) { + $opts->{workstation} = $self->{login}->{location}; + } + + my $response = $U->simplereq( + 'open-ils.auth', + 'open-ils.auth.authenticate.complete', + $opts ); if( my $code = $U->event_code($response) ) { diff --git a/docs/RELEASE_NOTES_NEXT/SIP/SIP_Workstation_Name.adoc b/docs/RELEASE_NOTES_NEXT/SIP/SIP_Workstation_Name.adoc new file mode 100644 index 0000000000..ad834e62a8 --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/SIP/SIP_Workstation_Name.adoc @@ -0,0 +1,8 @@ +Treat SIP Location Field as Login Workstation +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +When using a version of SIPServer that supports the feature, +the Location (CP) field of the Login (93) message will be +used as the workstation name if supplied. Blank or missing +location fields will be ignored. This allows users or reports +to determine which selfcheck performed a circulation. +