LP1259196: Use Location as Workstation on Login
authorJason Boyer <jboyer@library.in.gov>
Fri, 6 May 2016 18:08:48 +0000 (14:08 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 24 Aug 2016 15:17:59 +0000 (11:17 -0400)
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 <jboyer@library.in.gov>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
docs/RELEASE_NOTES_NEXT/SIP/SIP_Workstation_Name.adoc [new file with mode: 0644]

index cf98f33..81307f4 100644 (file)
@@ -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 (file)
index 0000000..ad834e6
--- /dev/null
@@ -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.
+