Bug 11715: Set the default of authnotrequired = 0 in get_template_and_user
authorChris Cormack <chrisc@catalyst.net.nz>
Mon, 10 Mar 2014 21:51:00 +0000 (10:51 +1300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 25 Jun 2014 15:26:33 +0000 (12:26 -0300)
To test:

Verify that pages in the OPAC and staff interface display correctly.

Note that there are cases where 'authnotrequired' was not passed
at all to get_template_and_user, so there may be pages that start
requiring authentication.  Whether that is correct or not depends
on context.

Follow up patches are to remove all the unnessecary setting of this
value, so that the only places we set are when we do want
authnotrequired=1

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

C4/Auth.pm

index e98b43c..b0f985f 100644 (file)
@@ -137,6 +137,7 @@ sub get_template_and_user {
 
     C4::Context->interface($in->{type});
 
+    $in->{'authnotrequired'} ||= 0;
     my $template = C4::Templates::gettemplate(
         $in->{'template_name'},
         $in->{'type'},