Diff for /loncom/auth/lonroles.pm between versions 1.189 and 1.190

version 1.189, 2008/05/14 19:18:37 version 1.190, 2008/05/14 22:26:48
Line 138  sub handler { Line 138  sub handler {
                 if (my ($domain,$coursenum) =                  if (my ($domain,$coursenum) =
     ($envkey =~ m-^form\.cc\./($match_domain)/($match_courseid)$-)) {      ($envkey =~ m-^form\.cc\./($match_domain)/($match_courseid)$-)) {
                    # See if that is even allowed                     # See if that is even allowed
                                          my %crsenv=&Apache::lonnet::get('environment',['internal.courseowner'],$domain,$coursenum);
                      # First find course owner
                      my ($owneruser,$ownerdomain)=split(/\:/,$crsenv{'internal.courseowner'});
                      # Check if course owner blocked cc-access
                       if (($owneruser) && ($ownerdomain)) {
                          my %blocked=&Apache::lonnet::get('environment',['domcoord.cc'],$ownerdomain,$owneruser);
                          if ($blocked{'domcoord.cc'} eq 'blocked') {
                             $env{'user.error.msg'}=':::1:Course owner '.$owneruser.' in domain '.$ownerdomain.' blocked domain coordinator access';
                             last;
                          }
                       }
                     if ($dcroles{$domain}) {                      if ($dcroles{$domain}) {
                         &check_privs($domain,$coursenum,$then,$now,'cc');                          &check_privs($domain,$coursenum,$then,$now,'cc');
                     }                      }
Line 147  sub handler { Line 157  sub handler {
 # Is this a recent ad-hoc CA-role?  # Is this a recent ad-hoc CA-role?
                 if (my ($domain,$user) =                  if (my ($domain,$user) =
     ($envkey =~ m-^form\.ca\./($match_domain)/($match_username)$-)) {      ($envkey =~ m-^form\.ca\./($match_domain)/($match_username)$-)) {
                      # See if still allowed
                       my %blocked=&Apache::lonnet::get('environment',['domcoord.author'],$domain,$user);
                       if ($blocked{'domcoord.author'} eq 'blocked') {
                          delete($env{$envkey});
                          $env{'user.error.msg'}=':::1:User '.$user.' in domain '.$domain.' blocked domain coordinator access';
                          last;
                       }
                     if (($dcroles{$domain}) && (&is_author_homeserver($user,$domain))) {                      if (($dcroles{$domain}) && (&is_author_homeserver($user,$domain))) {
                         &check_privs($domain,$user,$then,$now,'ca');                          &check_privs($domain,$user,$then,$now,'ca');
                     } else {                      } else {

Removed from v.1.189  
changed lines
  Added in v.1.190


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