Bug 18387: Allow sco-user to access errors templates
authorNick Clemens <nick@bywatersolutions.com>
Mon, 9 Jul 2018 13:30:38 +0000 (13:30 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 12 Apr 2019 01:47:21 +0000 (01:47 +0000)
To test:
 1 - Enable AuthoSelfCheck prefs
 2 - In opacuserjs or scouserjs add a fetch of an unreachable resources
 3 - Visit the SCO
 4 - Sign in as a patron then click 'finish'
 5 - Say 'yes' to receipt
 6 - Note you are directed to log in
 7 - Apply patch
 8 - Restart all the things
 9 - Repeat 4 & 5
10 - Sucess, receipt prints

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

C4/Auth.pm

index 39c6a6c..7f0a233 100644 (file)
@@ -192,7 +192,7 @@ sub get_template_and_user {
         if (
 # If the user logged in is the SCO user and they try to go out of the SCO module,
 # log the user out removing the CGISESSID cookie
-               $in->{template_name} !~ m|sco/|
+            $in->{template_name} !~ m|sco/| && $in->{template_name} !~ m|errors/|
             && C4::Context->preference('AutoSelfCheckID')
             && $user eq C4::Context->preference('AutoSelfCheckID')
           )