[open-ils-commits] [GIT] Evergreen ILS branch rel_3_2 updated. 8617a20446c607916bcaa8f7e69cdfb30230a25a

Evergreen Git git at git.evergreen-ils.org
Mon Dec 10 15:31:50 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, rel_3_2 has been updated
       via  8617a20446c607916bcaa8f7e69cdfb30230a25a (commit)
       via  68fd0b23643b7ecb965df88ea967db7b8ba2669b (commit)
      from  0f863c8b2eb8b75ce99ec1e043e30ca6ed7c5cff (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 8617a20446c607916bcaa8f7e69cdfb30230a25a
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 68fd0b23643b7ecb965df88ea967db7b8ba2669b
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