|
Lines 177-182
sub get_template_and_user {
Link Here
|
| 177 |
|
177 |
|
| 178 |
if ( $in->{'template_name'} !~ m/maintenance/ ) { |
178 |
if ( $in->{'template_name'} !~ m/maintenance/ ) { |
| 179 |
( $user, $cookie, $sessionID, $flags ) = checkauth( |
179 |
( $user, $cookie, $sessionID, $flags ) = checkauth( |
|
|
180 |
|
| 180 |
$in->{'query'}, |
181 |
$in->{'query'}, |
| 181 |
$in->{'authnotrequired'}, |
182 |
$in->{'authnotrequired'}, |
| 182 |
$in->{'flagsrequired'}, |
183 |
$in->{'flagsrequired'}, |
|
Lines 216-222
sub get_template_and_user {
Link Here
|
| 216 |
if ( |
217 |
if ( |
| 217 |
# If the user logged in is the SCO user and they try to go out of the SCO module, |
218 |
# If the user logged in is the SCO user and they try to go out of the SCO module, |
| 218 |
# log the user out removing the CGISESSID cookie |
219 |
# log the user out removing the CGISESSID cookie |
| 219 |
$in->{template_name} !~ m|sco/| && $in->{template_name} !~ m|errors/errorpage.tt| |
220 |
$in->{template_name} !~ m|sco/| && $in->{template_name} !~ m|sci/| && $in->{template_name} !~ m|errors/errorpage.tt| |
| 220 |
&& ( |
221 |
&& ( |
| 221 |
$is_sc_user || |
222 |
$is_sc_user || |
| 222 |
( |
223 |
( |
|
Lines 1140-1145
sub checkauth {
Link Here
|
| 1140 |
( |
1141 |
( |
| 1141 |
( $type eq 'opac' ) |
1142 |
( $type eq 'opac' ) |
| 1142 |
&& C4::Context->preference('OPACShibOnly') |
1143 |
&& C4::Context->preference('OPACShibOnly') |
|
|
1144 |
&& !$query->param('sco_user_login') |
| 1145 |
&& !$query->param('sci_user_login') |
| 1143 |
) |
1146 |
) |
| 1144 |
|| ( ( $type ne 'opac' ) |
1147 |
|| ( ( $type ne 'opac' ) |
| 1145 |
&& C4::Context->preference('staffShibOnly') ) |
1148 |
&& C4::Context->preference('staffShibOnly') ) |
|
Lines 1247-1252
sub checkauth {
Link Here
|
| 1247 |
$is_sc_user = 1; |
1250 |
$is_sc_user = 1; |
| 1248 |
} |
1251 |
} |
| 1249 |
|
1252 |
|
|
|
1253 |
|
| 1250 |
$session->param( 'number', $borrowernumber ); |
1254 |
$session->param( 'number', $borrowernumber ); |
| 1251 |
$session->param( 'id', $userid ); |
1255 |
$session->param( 'id', $userid ); |
| 1252 |
$session->param( 'cardnumber', $cardnumber ); |
1256 |
$session->param( 'cardnumber', $cardnumber ); |
|
Lines 1346-1352
sub checkauth {
Link Here
|
| 1346 |
print $query->redirect(-uri => $uri->as_string, -cookie => $cookie, -status=>'303 See other'); |
1350 |
print $query->redirect(-uri => $uri->as_string, -cookie => $cookie, -status=>'303 See other'); |
| 1347 |
exit; |
1351 |
exit; |
| 1348 |
} |
1352 |
} |
| 1349 |
|
|
|
| 1350 |
return ( $userid, $cookie, $sessionID, $flags ); |
1353 |
return ( $userid, $cookie, $sessionID, $flags ); |
| 1351 |
} |
1354 |
} |
| 1352 |
|
1355 |
|