LP#1842297: Only read active configuration
authoroajulianclementson <51331324+oajulianclementson@users.noreply.github.com>
Thu, 6 May 2021 20:27:12 +0000 (21:27 +0100)
committerChris Sharp <csharp@georgialibraries.org>
Mon, 8 Nov 2021 14:58:45 +0000 (09:58 -0500)
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/OpenAthens.pm
docs/RELEASE_NOTES_NEXT/Administration/OpenAthens_SignOn.adoc

index 4a5af93..22becd0 100644 (file)
@@ -60,7 +60,6 @@ sub perform_openathens_sso_if_required {
         $self->_get_openathens_config_for_org($ctx->{user}->home_ou);
 
     if ($openathens_config
-        && $U->is_true($openathens_config->{active})
         && $U->is_true($openathens_config->{auto_signon_enabled})
     ) {
         # Remove scheme and hostname from redirect_to (this may have been set
@@ -231,7 +230,7 @@ sub _get_openathens_config_for_org {
             }
         },
         where => {
-            '+coai' => { org_unit => $org_id }
+            '+coai' => { org_unit => $org_id, active => 't' }
         },
         order_by => { 'coai' => ['id'] }
     });
index 1c526d3..7060645 100644 (file)
@@ -51,7 +51,10 @@ for all libraries below it in your organisational hierarchy. A single
 OpenAthens sign-on configuration normally equates to a single *domain* in the 
 OpenAthens service. If in doubt refer to your OpenAthens account manager or 
 implementation partner.
-* *Active* - Enable this connection (enabled by default).
+* *Active* - Enable this connection (enabled by default). N.B. Evergreen
+  does not support more than one active connection to OpenAthens at a time. If
+  more than one connection is added here, Evergreen will use only the _first_
+  connection that has *Active* enabled.
 * *API key* - the 36-character OpenAthens *API key* that was generated in step 
   2 above.
 * *Connection ID* - the numerical *Connection ID* that was generated for the