version 1.6, 2000/06/05 20:28:17
|
version 1.7, 2000/09/06 14:25:17
|
Line 1
|
Line 1
|
# The LearningOnline Network |
# The LearningOnline Network |
# Cookie Based Access Handler |
# Cookie Based Access Handler |
# 5/21/99,5/22,5/29,5/31,6/15,16/11,22/11, |
# 5/21/99,5/22,5/29,5/31,6/15,16/11,22/11, |
# 01/06,01/13,05/31,06/01 Gerd Kortemeyer |
# 01/06,01/13,05/31,06/01,09/06 Gerd Kortemeyer |
|
|
package Apache::lonacc; |
package Apache::lonacc; |
|
|
Line 59 sub handler {
|
Line 59 sub handler {
|
# ---------------------------------------------------------------- Check access |
# ---------------------------------------------------------------- Check access |
|
|
if ($requrl!~/^\/adm\//) { |
if ($requrl!~/^\/adm\//) { |
if (&Apache::lonnet::allowed('bre',$requrl) eq '') { |
my $access=&Apache::lonnet::allowed('bre',$requrl); |
$ENV{'user.error.msg'}="$requrl:bre:1:1:Access denied"; |
if ($access eq '1') { |
return HTTP_NOT_ACCEPTABLE; |
$ENV{'user.error.msg'}="$requrl:bre:0:0:Choose Course"; |
} |
return HTTP_NOT_ACCEPTABLE; |
|
} |
|
if (($access ne '2') && ($access ne 'F')) { |
|
$ENV{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; |
|
return HTTP_NOT_ACCEPTABLE; |
|
} |
} |
} |
return OK; |
return OK; |
} else { |
} else { |