Lines 179-192
sub get_template_and_user {
Link Here
|
179 |
); |
179 |
); |
180 |
} |
180 |
} |
181 |
|
181 |
|
182 |
if ( $in->{type} eq 'opac' ) { |
182 |
if ( $in->{type} eq 'opac' && $user ) { |
183 |
my $kick_out; |
183 |
my $kick_out; |
184 |
|
184 |
|
185 |
if ( |
185 |
if ( |
186 |
# If the user logged in is the SCO user and they try to go out of the SCO module, |
186 |
# If the user logged in is the SCO user and they try to go out of the SCO module, |
187 |
# log the user out removing the CGISESSID cookie |
187 |
# log the user out removing the CGISESSID cookie |
188 |
$in->{template_name} !~ m|sco/| |
188 |
$in->{template_name} !~ m|sco/| |
189 |
&& $user |
|
|
190 |
&& C4::Context->preference('AutoSelfCheckID') |
189 |
&& C4::Context->preference('AutoSelfCheckID') |
191 |
&& $user eq C4::Context->preference('AutoSelfCheckID') |
190 |
&& $user eq C4::Context->preference('AutoSelfCheckID') |
192 |
) |
191 |
) |
Lines 198-204
sub get_template_and_user {
Link Here
|
198 |
# kick them out unless it is SCO with a valid permission |
197 |
# kick them out unless it is SCO with a valid permission |
199 |
# or they are a superlibrarian |
198 |
# or they are a superlibrarian |
200 |
$in->{template_name} !~ m|sci/| |
199 |
$in->{template_name} !~ m|sci/| |
201 |
&& $user |
|
|
202 |
&& haspermission( $user, { self_check => 'self_checkin_module' } ) |
200 |
&& haspermission( $user, { self_check => 'self_checkin_module' } ) |
203 |
&& !( |
201 |
&& !( |
204 |
$in->{template_name} =~ m|sco/| && haspermission( |
202 |
$in->{template_name} =~ m|sco/| && haspermission( |
205 |
- |
|
|