Bug 27342: Improve test for OPAC

We don't need to build allowed_scripts_for_private_opac for staff

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2021-01-05 11:18:26 +01:00 committed by Tomas Cohen Arazi
parent 18211bf233
commit 4c44dd5eb4
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 1 additions and 1 deletions

View File

@ -824,7 +824,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