@@ -, +, @@ --- C4/Auth.pm | 17 +++++++++++++++++ .../bootstrap/en/includes/masthead.inc | 4 ++++ 2 files changed, 21 insertions(+) --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -1064,6 +1064,23 @@ sub checkauth { } } + # If shib configured and shibOnly enabled, we should ignore anything other than a shibboleth type login. + if ( + $shib + && !$shibSuccess + && ( + ( + ( $type eq 'opac' ) + && C4::Context->preference('opacShibOnly') + ) + || ( ( $type ne 'opac' ) + && C4::Context->preference('staffShibOnly') ) + ) + ) + { + $return = 0; + } + # $return: 1 = valid user if ($return) { --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -75,6 +75,8 @@ [% IF Koha.Preference('casAuthentication') %] [%# CAS authentication is too complicated for modal window %]
  • Log in to create your own lists
  • + [% ELSIF shibbolethAuthentication && Koha.Preference('opacShibOnly') %] +
  • Log in to create your own lists
  • [% ELSE %]
  • Log in to create your own lists
  • [% END %] @@ -99,6 +101,8 @@
  • Log in to your account
  • [% ELSIF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %]
  • Log in to your account
  • + [% ELSIF shibbolethAuthentication && Koha.Preference('opacShibOnly') %] +
  • Log in to your account
  • [% ELSE %]
  • Log in to your account
  • [% END %] --