--- loncom/interface/loncreateuser.pm 2005/02/17 08:29:42 1.100 +++ loncom/interface/loncreateuser.pm 2005/06/23 21:59:13 1.107 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.100 2005/02/17 08:29:42 albertel Exp $ +# $Id: loncreateuser.pm,v 1.107 2005/06/23 21:59:13 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -108,10 +108,8 @@ 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)) + || (&Apache::lonnet::allowed('caa',$audom.'/'.$auname))) { return ''; } return 1; } @@ -119,7 +117,7 @@ sub authorpriv { sub print_username_entry_form { my $r=shift; - my $defdom=$ENV{'request.role.domain'}; + my $defdom=$env{'request.role.domain'}; my @domains = &Apache::loncommon::get_domains(); my $domform = &Apache::loncommon::select_dom_form($defdom,'ccdomain'); my $html=&Apache::lonxml::xmlbegin(); @@ -158,21 +156,25 @@ $lt{'dom'}: