--- loncom/interface/loncreateuser.pm 2005/06/06 00:07:43 1.103 +++ loncom/interface/loncreateuser.pm 2005/06/17 21:04:40 1.104 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.103 2005/06/06 00:07:43 albertel Exp $ +# $Id: loncreateuser.pm,v 1.104 2005/06/17 21:04:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -108,10 +108,7 @@ sub my_custom_roles { sub authorpriv { my ($auname,$audom)=@_; - if (($auname ne $env{'user.name'}) || - (($audom ne $env{'user.domain'}) && - ($audom ne $env{'request.role.domain'}))) { return ''; } - unless (&Apache::lonnet::allowed('cca',$audom)) { return ''; } + unless (&Apache::lonnet::allowed('cca',$audom.'/'.$auname)) { return ''; } return 1; } @@ -1553,7 +1550,7 @@ sub handler { (&Apache::lonnet::allowed('cin',$env{'request.course.id'})) || (&Apache::lonnet::allowed('ccr',$env{'request.course.id'})) || (&Apache::lonnet::allowed('cep',$env{'request.course.id'})) || - (&Apache::lonnet::allowed('cca',$env{'request.role.domain'})) || + (&authorpriv($env{'user.name'},$env{'request.role.domain'})) || (&Apache::lonnet::allowed('mau',$env{'request.role.domain'}))) { &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header;