From 926b57bf3b96acf75892a688cfc320d61b6ab1c2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 5 Jan 2021 11:18:26 +0100 Subject: [PATCH] Bug 27342: Improve test for OPAC We don't need to build allowed_scripts_for_private_opac for staff Signed-off-by: Martin Renvoize --- C4/Auth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 6ce57fe54f..2c34375f97 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -827,7 +827,7 @@ sub checkauth { my $template_name = shift; $type = 'opac' unless $type; - unless ( C4::Context->preference("OpacPublic") ) { + if ( $type eq 'opac' && !C4::Context->preference("OpacPublic") ) { my @allowed_scripts_for_private_opac = qw( opac-memberentry.tt opac-registration-email-sent.tt -- 2.39.5