Specify which treatment you want in the av_format attribute.
For example: <login id="sc" password="pwd" institution="main" av_format="3m">
-->
+ <!--
+ The login attribute patron_status_always_permit_loans specifies whether
+ the charge privileges denied, renewal privilges denied, and
+ card reported lost flags in the patron status block should be
+ coerced to permissive values regardless of the actual state
+ of the patron record. Turning this on works around an issue
+ where a 2019-12 change by the Hoopla SIP2 client takes those flag
+ fields into account, but some libraries may not wish those
+ to block a patron's access to online resources that use
+ SIP2 to authenticate. This setting can also be set as
+ an implementation_config option; note that if it is set to
+ 'true' or 'false' as a login attribute, the login attribute will
+ override whatever is set in the implementation_config.
+ -->
<login id="scclient" password="clientpwd" institution="gapines"/>
</accounts>
<option name='patron_calculate_recal_ok' value='true' />
-->
+ <!-- see description of patron_status_always_permit_loans in the login section -->
+ <!--
+ <option name='patron_status_always_permit_loans' value='false' />
+ -->
+
</options>
<checkin_override>
return '000'; # Unspecified
}
+# method to check to see if charge_ok, renew_ok, and
+# lost_card should be coerced to return a status indicating
+# that the patron should be allowed to circulate; this
+# implements a workaround further described in
+# https://bugs.launchpad.net/evergreen/+bug/1853363
+sub patron_status_always_permit_loans_set {
+ my $self = shift;
+
+ my $login = OpenILS::SIP->login_account();
+
+ return (
+ OpenILS::SIP::to_bool($login->{patron_status_always_permit_loans}) //
+ OpenILS::SIP::to_bool(OpenILS::SIP->get_option_value('patron_status_always_permit_loans'))
+ ) ||
+ 0;
+}
+
# How much more detail do we need to check here?
# sec: adding logic to return false if user is barred, has a circulation block
# or an expired card
my $u = $self->{user};
my $circ_is_blocked = 0;
+ return 1 if $self->patron_status_always_permit_loans_set();
+
# compute expiration date for borrowing privileges
my $expire = DateTime::Format::ISO8601->new->parse_datetime(clean_ISO8601($u->expire_date));
my $u = $self->{user};
my $renew_is_blocked = 0;
+ return 1 if $self->patron_status_always_permit_loans_set();
+
# compute expiration date for borrowing privileges
my $expire = DateTime::Format::ISO8601->new->parse_datetime(clean_ISO8601($u->expire_date));
# return true if the card provided is marked as lost
sub card_lost {
my $self = shift;
+
+ return 0 if $self->patron_status_always_permit_loans_set();
+
return $self->{user}->card->active eq 'f';
}
--- /dev/null
+Add patron_status_always_permit_loans Option to SIP Server
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Evergreen now has a new `oils_sip.xml` login attribute called
+`patron_status_always_permit_loans` that specifies whether
+the charge privileges denied, renewal privilges denied, and
+card reported lost flags in the patron status block should be
+coerced to permissive values regardless of the actual state
+of the patron record. Turning this on works around an issue
+where a 2019-12 change by the Hoopla SIP2 client takes those flag
+fields into account, but some libraries may not wish those
+to block a patron's access to online resources that use
+SIP2 to authenticate. This setting can also be set as
+an `implementation_config` option; note that if it is set to
+'true' or 'false' as a login attribute, the login attribute will
+override whatever is set in the `implementation_config`.