From f5867b209304ecaf25ce94bf538299d9d15cc34e Mon Sep 17 00:00:00 2001 From: Jason Boyer Date: Fri, 6 May 2016 14:08:48 -0400 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/lib/OpenILS/SIP.pm | 24 ++++++++++++------- .../SIP/SIP_Workstation_Name.adoc | 8 +++++++ 2 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 docs/RELEASE_NOTES_NEXT/SIP/SIP_Workstation_Name.adoc 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. + -- 2.43.2