Diff for /loncom/auth/lonacc.pm between versions 1.33 and 1.36

version 1.33, 2002/06/15 19:45:26 version 1.36, 2002/10/25 13:59:40
Line 155  sub handler { Line 155  sub handler {
   
 # ---------------------------------------------------------------- Check access  # ---------------------------------------------------------------- Check access
   
             if ($requrl!~/^\/adm\//) {              if ($requrl!~/^\/adm|public\//) {
  my $access=&Apache::lonnet::allowed('bre',$requrl);   my $access=&Apache::lonnet::allowed('bre',$requrl);
                 if ($access eq '1') {                  if ($access eq '1') {
    $ENV{'user.error.msg'}="$requrl:bre:0:0:Choose Course";     $ENV{'user.error.msg'}="$requrl:bre:0:0:Choose Course";
Line 207  sub handler { Line 207  sub handler {
     }      }
   
 # -------------------------------------------- See if this is a public resource  # -------------------------------------------- See if this is a public resource
     if (&Apache::lonnet::metadata($requrl,'copyright') eq 'public') {      if (($requrl=~/^\/public\//) || 
           (&Apache::lonnet::metadata($requrl,'copyright') eq 'public')) {
         &Apache::lonnet::logthis('Granting public access: '.$requrl);          &Apache::lonnet::logthis('Granting public access: '.$requrl);
  $ENV{'user.name'}='public';   $ENV{'user.name'}='public';
         $ENV{'user.domain'}='public';          $ENV{'user.domain'}='public';
Line 216  sub handler { Line 217  sub handler {
         $ENV{'request.filename'} = $r->filename;          $ENV{'request.filename'} = $r->filename;
         return OK;          return OK;
     }      }
 # ----------------------------------------------- Store where they wanted to go  # -------------------------------------------------------------- Not authorized
           $requrl=~/\.(\w+)$/;
     $ENV{'request.firsturl'}=$requrl;      if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') ||
     return FORBIDDEN;          ($requrl=~/^\/adm\/(roles|logout)/)) {
   # -------------------------- Store where they wanted to go and get login screen
          $ENV{'request.firsturl'}=$requrl;
          return FORBIDDEN;
      } else {
   # --------------------------------------------------------------------- Goodbye
          return HTTP_BAD_REQUEST;
      }
 }  }
   
 1;  1;

Removed from v.1.33  
changed lines
  Added in v.1.36


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>