[open-ils-commits] [GIT] Evergreen ILS branch master updated. 209dd231acd30e77015aa5dc001e0dc9b423e95a

Evergreen Git git at git.evergreen-ils.org
Mon Dec 10 15:31:27 EST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  209dd231acd30e77015aa5dc001e0dc9b423e95a (commit)
       via  60492d08be9037cf2a73f08d0d0e0deb7d4c4f79 (commit)
      from  95a263ce2c54a592e9825a13c8d567570e7d437d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 209dd231acd30e77015aa5dc001e0dc9b423e95a
Author: Bill Erickson <berickxx at gmail.com>
Date:   Fri Dec 7 14:19:32 2018 -0500

    LP#1807398 marc_stream/oils_header auth repairs
    
    Fixed a few code thinkos in marc stream workstation login support.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Jason Boyer <JBoyer at library.in.gov>

diff --git a/Open-ILS/src/support-scripts/marc_stream_importer.pl b/Open-ILS/src/support-scripts/marc_stream_importer.pl
index 19e3f49..ac46584 100755
--- a/Open-ILS/src/support-scripts/marc_stream_importer.pl
+++ b/Open-ILS/src/support-scripts/marc_stream_importer.pl
@@ -95,7 +95,7 @@ GetOptions(
     'verbose'               => \$verbose,
     'username=s'            => \$username,
     'password=s'            => \$password,
-    'workstation'           => \$workstation,
+    'workstation=s'         => \$workstation,
     'tempdir=s'             => \$tempdir,
     'spoolfile=s'           => \$spoolfile,
     'wait=i'                => \$wait_time,
diff --git a/Open-ILS/src/support-scripts/oils_header.pl b/Open-ILS/src/support-scripts/oils_header.pl
index de9a84f..55da43c 100755
--- a/Open-ILS/src/support-scripts/oils_header.pl
+++ b/Open-ILS/src/support-scripts/oils_header.pl
@@ -151,7 +151,7 @@ sub oils_event_die {
 # Login to the auth server and set the global $authtoken var
 #----------------------------------------------------------------
 sub oils_login {
-	my( $username, $password, $type ) = @_;
+	my( $username, $password, $type, $workstation ) = @_;
 
 	$type |= "staff";
 
@@ -160,9 +160,12 @@ sub oils_login {
 		'open-ils.auth.authenticate.init', $username, $nonce);
 	err("No auth seed") unless $seed;
 
-	my $opts = {	username => $username,
-			password => md5_hex($seed . md5_hex($password)),
-			type => $type };
+    my $opts = {
+        username => $username,
+        password => md5_hex($seed . md5_hex($password)),
+        type => $type,
+        nonce => $nonce
+    };
 
 	if(defined($workstation)) {
 		$opts->{workstation} = $workstation;

commit 60492d08be9037cf2a73f08d0d0e0deb7d4c4f79
Author: Jason Boyer <JBoyer at library.in.gov>
Date:   Fri Dec 7 10:05:43 2018 -0500

    LP1807398: Add workstation to marc_stream_importer
    
    In order to work properly with vandelay session
    tracking in 3.2+ a workstation is required at login.
    This branch adds a workstation option to the importer
    and alerts the user if it's missing.
    
    Signed-off-by: Jason Boyer <JBoyer at library.in.gov>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

diff --git a/Open-ILS/src/support-scripts/marc_stream_importer.pl b/Open-ILS/src/support-scripts/marc_stream_importer.pl
index 412d466..19e3f49 100755
--- a/Open-ILS/src/support-scripts/marc_stream_importer.pl
+++ b/Open-ILS/src/support-scripts/marc_stream_importer.pl
@@ -59,6 +59,7 @@ my $help        = 0;
 my $osrf_config = '/openils/conf/opensrf_core.xml';
 my $username    = '';
 my $password    = '';
+my $workstation = '';
 my $tempdir     = '';
 my $spoolfile   = '';
 my $wait_time   = 5;
@@ -94,6 +95,7 @@ GetOptions(
     'verbose'               => \$verbose,
     'username=s'            => \$username,
     'password=s'            => \$password,
+    'workstation'           => \$workstation,
     'tempdir=s'             => \$tempdir,
     'spoolfile=s'           => \$spoolfile,
     'wait=i'                => \$wait_time,
@@ -142,6 +144,9 @@ sub usage {
     --password
         Evergreen user account password
 
+    --workstation
+        Evergreen workstation
+
     --tempdir
         MARC data received via the network is stored in a temporary
         file so Vandelay can access it.  This must be a directory
@@ -226,8 +231,8 @@ if ($deprecated_queue) {
 }
 
 
-die "--username AND --password required.  --help for more info.\n" 
-    unless $username and $password;
+die "--username, --password, AND --workstation required.  --help for more info.\n" 
+    unless $username and $password and $workstation;
 die "--bib-queue OR --auth-queue required.  --help for more info.\n" 
     unless $bib_queue or $auth_queue;
 
@@ -503,7 +508,7 @@ sub process_file {
 # the authtoken will timeout after the configured inactivity period.
 # When that happens, get a new one.
 sub new_auth_token {
-    oils_login($username, $password, 'staff') 
+    oils_login($username, $password, 'staff', $workstation)
         or die "Unable to login to Evergreen as user $username";
 }
 
diff --git a/Open-ILS/src/support-scripts/oils_header.pl b/Open-ILS/src/support-scripts/oils_header.pl
index d0a1870..de9a84f 100755
--- a/Open-ILS/src/support-scripts/oils_header.pl
+++ b/Open-ILS/src/support-scripts/oils_header.pl
@@ -160,11 +160,16 @@ sub oils_login {
 		'open-ils.auth.authenticate.init', $username, $nonce);
 	err("No auth seed") unless $seed;
 
+	my $opts = {	username => $username,
+			password => md5_hex($seed . md5_hex($password)),
+			type => $type };
+
+	if(defined($workstation)) {
+		$opts->{workstation} = $workstation;
+	}
+
 	my $response = $apputils->simplereq( $AUTH, 
-		'open-ils.auth.authenticate.complete', 
-		{	username => $username, 
-			password => md5_hex($seed . md5_hex($password)), 
-			type => $type, nonce => $nonce });
+		'open-ils.auth.authenticate.complete', $opts);
 
 	err("No auth response returned on login") unless $response;
 
diff --git a/docs/admin/marc_stream_importer.adoc b/docs/admin/marc_stream_importer.adoc
new file mode 100644
index 0000000..75a7555
--- /dev/null
+++ b/docs/admin/marc_stream_importer.adoc
@@ -0,0 +1,8 @@
+Changes to marc_stream_importer.pl command line options
+-----------------------
+
+To work properly with Vandelay session tracking a --workstation
+option is now required for the marc_stream_importer.pl script.
+It needs to be an existing workstation name in your system and
+if it is missing from the command line the script will fail and
+you will be notified.

-----------------------------------------------------------------------

Summary of changes:
 .../src/support-scripts/marc_stream_importer.pl    |   11 ++++++++---
 Open-ILS/src/support-scripts/oils_header.pl        |   18 +++++++++++++-----
 docs/admin/marc_stream_importer.adoc               |    8 ++++++++
 3 files changed, 29 insertions(+), 8 deletions(-)
 create mode 100644 docs/admin/marc_stream_importer.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list