@@ -, +, @@ - AutoSelfCheckAllowed => 'Allow' - AutoSelfCheckId and AutoSelfCheckPass => Set these to a patron with - WebBasedSelfCheck -> 'Enable' - OpacShibOnly -> "Don't allow" - SelfCheckoutByLogin -> 'Shibboleth' --- C4/Auth.pm | 3 ++- ..._30444-edit_SelfCheckoutByLogin_syspref.pl | 17 +++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 2 +- .../admin/preferences/circulation.pref | 5 ++-- opac/sco/sco-main.pl | 24 ++++++++++++++++--- 5 files changed, 44 insertions(+), 7 deletions(-) create mode 100755 installer/data/mysql/atomicupdate/bug_30444-edit_SelfCheckoutByLogin_syspref.pl --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -1038,7 +1038,7 @@ sub checkauth { my ( $return, $cardnumber ); # If shib is enabled and we have a shib login, does the login match a valid koha user - if ( $shib && $shib_login ) { + if ( $shib && $shib_login && !$query->param('userid')) { my $retuserid; # Do not pass password here, else shib will not be checked in checkpw. @@ -1137,6 +1137,7 @@ sub checkauth { ( ( $type eq 'opac' ) && C4::Context->preference('OPACShibOnly') + && C4::Context->preference('SelfCheckoutByLogin') ne 'shibboleth' ) || ( ( $type ne 'opac' ) && C4::Context->preference('staffShibOnly') ) --- a/installer/data/mysql/atomicupdate/bug_30444-edit_SelfCheckoutByLogin_syspref.pl +++ a/installer/data/mysql/atomicupdate/bug_30444-edit_SelfCheckoutByLogin_syspref.pl @@ -0,0 +1,17 @@ +use Modern::Perl; + +return { + bug_number => "30444", + description => "Edit existing system preference SelfCheckoutByLogin", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + # Update existing SelfCheckoutByLogin syspref values + $dbh->do(q{UPDATE systempreferences SET value="username" WHERE variable="SelfCheckoutByLogin" and value IN ("1")}); + $dbh->do(q{UPDATE systempreferences SET value="cardnumber" WHERE variable="SelfCheckoutByLogin" and (value IN ("0") OR value IS NULL)}); + + # Update the options, type and explanation of the SelfCheckoutByLogin syspref + $dbh->do(q{UPDATE systempreferences SET options="cardnumber|username|shibboleth", type="Choice", explanation="Have patrons log in to the web-based self checkout system with their username/password, their cardnumber, or using Shibboleth" WHERE variable="SelfCheckoutByLogin"}); + }, +}; --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -607,7 +607,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'), ('SelfCheckInUserCSS','',NULL,'Add CSS to be included in the self check-in module in an embedded