Lines 931-944
sub checkauth {
Link Here
|
931 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
931 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
932 |
); |
932 |
); |
933 |
|
933 |
|
934 |
my $sessiontype = $session->param('sessiontype') || ''; |
934 |
$flags = haspermission( $userid, $flagsrequired ); |
935 |
unless ( $sessiontype && $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in... |
935 |
if ($flags) { |
936 |
$flags = haspermission( $userid, $flagsrequired ); |
936 |
$loggedin = 1; |
937 |
if ($flags) { |
937 |
} else { |
938 |
$loggedin = 1; |
938 |
$info{'nopermission'} = 1; |
939 |
} else { |
|
|
940 |
$info{'nopermission'} = 1; |
941 |
} |
942 |
} |
939 |
} |
943 |
} |
940 |
} |
944 |
} elsif ( !$logout ) { |
941 |
} elsif ( !$logout ) { |
Lines 959-965
sub checkauth {
Link Here
|
959 |
|
956 |
|
960 |
unless ( $userid ) { |
957 |
unless ( $userid ) { |
961 |
#we initiate a session prior to checking for a username to allow for anonymous sessions... |
958 |
#we initiate a session prior to checking for a username to allow for anonymous sessions... |
962 |
my $session = get_session("") or die "Auth ERROR: Cannot get_session()"; |
959 |
$session ||= get_session("") or die "Auth ERROR: Cannot get_session()"; |
963 |
|
960 |
|
964 |
# Save anonymous search history in new session so it can be retrieved |
961 |
# Save anonymous search history in new session so it can be retrieved |
965 |
# by get_template_and_user to store it in user's search history after |
962 |
# by get_template_and_user to store it in user's search history after |
966 |
- |
|
|