Diff for /loncom/auth/lonacc.pm between versions 1.100 and 1.103

version 1.100, 2006/09/19 18:03:02 version 1.103, 2006/12/11 14:06:04
Line 36  use Apache::lonnet; Line 36  use Apache::lonnet;
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::restrictedaccess();  use Apache::restrictedaccess();
   use Apache::blockedaccess(); 
 use CGI::Cookie();  use CGI::Cookie();
 use Fcntl qw(:flock);  use Fcntl qw(:flock);
 use LONCAPA;  use LONCAPA;
Line 164  sub sso_login { Line 165  sub sso_login {
     # machine      # machine
     &Apache::lonauth::success($r,$user,$domain,$home,'noredirect');      &Apache::lonauth::success($r,$user,$domain,$home,'noredirect');
     $r->internal_redirect('/adm/switchserver');      $r->internal_redirect('/adm/switchserver');
       $r->set_handlers('PerlHandler'=> undef);
  } else {   } else {
     # need to login them in, so generate the need data that      # need to login them in, so generate the need data that
     # migrate expects to do login      # migrate expects to do login
Line 178  sub sso_login { Line 180  sub sso_login {
  $r->dir_config('lonHostID'));   $r->dir_config('lonHostID'));
     $env{'form.token'} = $token;      $env{'form.token'} = $token;
     $r->internal_redirect('/adm/migrateuser');      $r->internal_redirect('/adm/migrateuser');
       $r->set_handlers('PerlHandler'=> undef);
  }   }
  return OK;   return OK;
     } elsif (defined($r->dir_config('lonSSOUserUnknownRedirect'))) {      } elsif (defined($r->dir_config('lonSSOUserUnknownRedirect'))) {
  $r->internal_redirect($r->dir_config('lonSSOUserUnknownRedirect'));   $r->internal_redirect($r->dir_config('lonSSOUserUnknownRedirect'));
    $r->set_handlers('PerlHandler'=> undef);
  return OK;   return OK;
     }      }
     return undef;      return undef;
Line 197  sub handler { Line 201  sub handler {
   
     my $handle;      my $handle;
     if ($lonid) {      if ($lonid) {
  $handle=$lonid->value;   $handle=&LONCAPA::clean_handle($lonid->value);
         $handle=~s/\W//g;  
     }      }
   
     my $result = &sso_login($r,$lonid,$handle);      my $result = &sso_login($r,$lonid,$handle);
Line 254  sub handler { Line 257  sub handler {
  &Apache::restrictedaccess::setup_handler($r);   &Apache::restrictedaccess::setup_handler($r);
  return OK;   return OK;
     }      }
               if ($access eq 'B') {
                   &Apache::blockedaccess::setup_handler($r);
                   return OK;
               }
     if (($access ne '2') && ($access ne 'F')) {      if (($access ne '2') && ($access ne 'F')) {
  $env{'user.error.msg'}="$requrl:bre:1:1:Access Denied";   $env{'user.error.msg'}="$requrl:bre:1:1:Access Denied";
  return HTTP_NOT_ACCEPTABLE;    return HTTP_NOT_ACCEPTABLE; 

Removed from v.1.100  
changed lines
  Added in v.1.103


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