version 1.38, 2003/02/03 18:03:52
|
version 1.44, 2003/04/16 15:59:15
|
Line 176 sub handler {
|
Line 176 sub handler {
|
if ($ENV{'request.course.id'}) { |
if ($ENV{'request.course.id'}) { |
&Apache::lonnet::countacc($requrl); |
&Apache::lonnet::countacc($requrl); |
$requrl=~/\.(\w+)$/; |
$requrl=~/\.(\w+)$/; |
if (&Apache::loncommon::fileembstyle($1) eq 'ssi') { |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
|
($requrl=~/^\/adm\/.*\/(aboutme|navmaps|smppg|bulletinboard)(\?|$)/) || |
|
($requrl=~/^\/adm\/wrapper\//) || |
|
($requrl=~/^\/public\/.*\/syllabus$/)) { |
# ------------------------------------- This is serious stuff, get symb and log |
# ------------------------------------- This is serious stuff, get symb and log |
my $query=$r->args; |
my $query=$r->args; |
my $symb; |
my $symb; |
Line 197 sub handler {
|
Line 200 sub handler {
|
return HTTP_NOT_ACCEPTABLE; |
return HTTP_NOT_ACCEPTABLE; |
} |
} |
} else { |
} else { |
$symb=&Apache::lonnet::symbread; |
$symb=&Apache::lonnet::symbread($requrl); |
|
my ($map,$mid,$murl)=split(/\_\_\_/,$symb); |
|
&Apache::lonnet::symblist($map,$murl => $mid, |
|
'last_known' => $murl); |
} |
} |
$ENV{'request.symb'}=$symb; |
$ENV{'request.symb'}=$symb; |
&Apache::lonnet::courseacclog($symb); |
&Apache::lonnet::courseacclog($symb); |
Line 216 sub handler {
|
Line 222 sub handler {
|
if ($requrl=~m|^/public/| |
if ($requrl=~m|^/public/| |
|| (&Apache::lonnet::metadata($requrl,'copyright') eq 'public')) { |
|| (&Apache::lonnet::metadata($requrl,'copyright') eq 'public')) { |
&Apache::lonnet::logthis('Granting public access: '.$requrl); |
&Apache::lonnet::logthis('Granting public access: '.$requrl); |
|
my $buffer; |
|
$r->read($buffer,$r->header_in('Content-length')); |
|
&Apache::loncommon::get_unprocessed_cgi($buffer); |
$ENV{'user.name'}='public'; |
$ENV{'user.name'}='public'; |
$ENV{'user.domain'}='public'; |
$ENV{'user.domain'}='public'; |
$ENV{'request.state'} = "published"; |
$ENV{'request.state'} = "published"; |
Line 226 sub handler {
|
Line 235 sub handler {
|
# -------------------------------------------------------------- Not authorized |
# -------------------------------------------------------------- Not authorized |
$requrl=~/\.(\w+)$/; |
$requrl=~/\.(\w+)$/; |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
($requrl=~/^\/adm\/(roles|logout)/) || |
($requrl=~/^\/adm\/(roles|logout|email|menu|remote)/) || |
($requrl=~m|^/prtspool/|)) { |
($requrl=~m|^/prtspool/|)) { |
# -------------------------- Store where they wanted to go and get login screen |
# -------------------------- Store where they wanted to go and get login screen |
$ENV{'request.firsturl'}=$requrl; |
$ENV{'request.querystring'}=$r->args; |
|
$ENV{'request.firsturl'}=$requrl; |
return FORBIDDEN; |
return FORBIDDEN; |
} else { |
} else { |
# --------------------------------------------------------------------- Goodbye |
# --------------------------------------------------------------------- Goodbye |