From ba1a51f1b0602cb2a5a205b7da5ae19b564f5b96 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 3 Feb 2021 12:45:45 +0000 Subject: [PATCH] Bug 18506: (QA follow-up) opacShibOnly -> OPACShibOnly As requested Signed-off-by: Nick Clemens --- C4/Auth.pm | 4 ++-- installer/data/mysql/atomicupdate/shibOnly.perl | 2 +- .../prog/en/modules/admin/preferences/opac.pref | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index d76c2a2a76..8469a204ae 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1107,7 +1107,7 @@ sub checkauth { && ( ( ( $type eq 'opac' ) - && C4::Context->preference('opacShibOnly') + && C4::Context->preference('OPACShibOnly') ) || ( ( $type ne 'opac' ) && C4::Context->preference('staffShibOnly') ) @@ -1411,7 +1411,7 @@ sub checkauth { if ($shib) { #If shibOnly is enabled just go ahead and redirect directly - if ( (($type eq 'opac') && C4::Context->preference('opacShibOnly')) || (($type ne 'opac') && C4::Context->preference('staffShibOnly')) ) { + if ( (($type eq 'opac') && C4::Context->preference('OPACShibOnly')) || (($type ne 'opac') && C4::Context->preference('staffShibOnly')) ) { my $redirect_url = login_shib_url( $query ); print $query->redirect( -uri => "$redirect_url", -status => 303 ); safe_exit; diff --git a/installer/data/mysql/atomicupdate/shibOnly.perl b/installer/data/mysql/atomicupdate/shibOnly.perl index 9b67d0fb42..47130cf597 100644 --- a/installer/data/mysql/atomicupdate/shibOnly.perl +++ b/installer/data/mysql/atomicupdate/shibOnly.perl @@ -1,6 +1,6 @@ $DBversion = 'XXX'; # will be replaced by the RM if( CheckVersion( $DBversion ) ) { - $dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('opacShibOnly','0','If ON enables shibboleth only authentication for the opac','','YesNo'),('staffShibOnly','0','If ON enables shibboleth only authentication for the staff client','','YesNo')" ); + $dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACShibOnly','0','If ON enables shibboleth only authentication for the opac','','YesNo'),('staffShibOnly','0','If ON enables shibboleth only authentication for the staff client','','YesNo')" ); SetVersion( $DBversion ); print "Upgrade to $DBversion done (Bug XXXXX - shibOnly preferences)\n"; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index 16d18c1d6c..25db7ab70d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -934,7 +934,7 @@ OPAC: - "." Authentication: - - - pref: opacShibOnly + - pref: OPACShibOnly choices: yes: "Don't allow" no: Allow diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt index c0b2763937..a773d58e25 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt @@ -79,7 +79,7 @@

Sorry, your Shibboleth identity does not match a valid library identity.

- [% UNLESS ( Koha.Preference('opacShibOnly') ) %] + [% UNLESS ( Koha.Preference('OPACShibOnly') ) %] [% IF ( casAuthentication ) %] [% IF ( invalidCasLogin ) %] @@ -96,7 +96,7 @@

Shibboleth Login

If you have a Shibboleth account, please click here to log in.

[% END # /IF invalidShibLogin %] - [% UNLESS ( Koha.Preference('opacShibOnly') ) %] + [% UNLESS ( Koha.Preference('OPACShibOnly') ) %] [% IF ( casAuthentication ) %]

CAS login

If you do not have a Shibboleth account, but you do have a CAS account, you can use CAS.

@@ -107,7 +107,7 @@ [% END %] [% END # /IF shibbolethAuthentication %] - [% UNLESS ( Koha.Preference('opacShibOnly') ) %] + [% UNLESS ( Koha.Preference('OPACShibOnly') ) %] [% IF ( casAuthentication ) %] [% IF ( shibbolethAuthentication ) %] [% IF ( casServerUrl ) %] @@ -163,9 +163,9 @@ Log in with Google

If you do not have a Google account, but do have a local account, you can still log in:

[% END # /IF GoogleOpenIDConnect %] - [% END # /UNLESS opacShibOnly %] + [% END # /UNLESS OPACShibOnly %] - [% IF !Koha.Preference('opacShibOnly') or SCO_login or SCI_login %] + [% IF !Koha.Preference('OPACShibOnly') or SCO_login or SCI_login %] [% IF SCO_login %]
[% ELSIF SCI_login %] @@ -215,7 +215,7 @@ [% END %]
- [% END # / IF !opacShibOnly or SCO_login or SCI_login %] + [% END # / IF !OPACShibOnly or SCO_login or SCI_login %] [% END # / IF loginprompt %] [% ELSE %] -- 2.11.0