version 1.14, 2007/04/11 21:36:58
|
version 1.15, 2007/10/02 01:09:59
|
Line 34 use Apache::Constants qw(:common :http :
|
Line 34 use Apache::Constants qw(:common :http :
|
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
use CGI::Cookie(); |
|
use Fcntl qw(:flock); |
use Fcntl qw(:flock); |
use Apache::lonacc(); |
use Apache::lonacc(); |
use LONCAPA(); |
use LONCAPA(); |
Line 46 sub handler {
|
Line 45 sub handler {
|
if (&Apache::lonnet::is_domainimage($requrl)) { |
if (&Apache::lonnet::is_domainimage($requrl)) { |
return OK; |
return OK; |
} |
} |
my %cookies=CGI::Cookie->parse($r->header_in('Cookie')); |
|
my $lonid=$cookies{'lonID'}; |
my $handle = &Apache::lonnet::check_for_valid_session($r); |
if ($lonid) { |
if ($handle ne '') { |
my $handle=&LONCAPA::clean_handle($lonid->value); |
|
my $lonidsdir=$r->dir_config('lonIDsDir'); |
my $lonidsdir=$r->dir_config('lonIDsDir'); |
if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) { |
&Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle); |
&Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle); |
if ($env{'user.name'} ne 'public' |
if ($env{'user.name'} ne 'public' |
&& $env{'user.domain'} ne 'public') { |
&& $env{'user.domain'} ne 'public') { |
return OK; |
return OK; |
|
} |
|
} |
} |
} |
} |
if ($requrl=~m|^/public/| |
if ($requrl=~m|^/public/| |