--- loncom/auth/lonacc.pm 2000/06/05 20:28:17 1.6 +++ loncom/auth/lonacc.pm 2000/09/06 14:25:17 1.7 @@ -1,7 +1,7 @@ # The LearningOnline Network # Cookie Based Access Handler # 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; @@ -59,10 +59,15 @@ sub handler { # ---------------------------------------------------------------- Check access if ($requrl!~/^\/adm\//) { - if (&Apache::lonnet::allowed('bre',$requrl) eq '') { - $ENV{'user.error.msg'}="$requrl:bre:1:1:Access denied"; - return HTTP_NOT_ACCEPTABLE; - } + my $access=&Apache::lonnet::allowed('bre',$requrl); + if ($access eq '1') { + $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; } else { 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.