Test plan:
Add some page under Additional contents.
Enforce GDPR policy.
Test with user that has no consent (yet or anymore).
Check if you can reach additional contents with opac-page.pl.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
# If we enforce GDPR and the user did not consent, redirect
# Exceptions for consent page itself and SCI/SCO system
if( $in->{type} eq 'opac' && $user &&
- $in->{'template_name'} !~ /^(opac-patron-consent|sc[io]\/)/ &&
+ $in->{'template_name'} !~ /^(opac-page|opac-patron-consent|sc[io]\/)/ &&
C4::Context->preference('GDPR_Policy') eq 'Enforced' )
{
my $consent = Koha::Patron::Consents->search({