--- loncom/interface/loncreateuser.pm 2006/11/09 22:25:27 1.131 +++ loncom/interface/loncreateuser.pm 2006/11/20 23:36:40 1.132 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.131 2006/11/09 22:25:27 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.132 2006/11/20 23:36:40 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -781,7 +781,7 @@ END $currentauth=~/^internal:/ or $currentauth=~/^localauth:/ ) { # bad authentication scheme - if (&Apache::lonnet::allowed('mau',$env{'request.role.domain'})) { + if (&Apache::lonnet::allowed('mau',$ccdomain)) { &initialize_authen_forms(); my %lt=&Apache::lonlocal::texthash( 'err' => "ERROR", @@ -804,7 +804,7 @@ $lt{'uuas'} ($currentauth). $lt{'sldb'}.

$authformloc

ENDBADAUTH } else { - # This user is not allowed to modify the users + # This user is not allowed to modify the user's # authentication scheme, so just notify them of the problem my %lt=&Apache::lonlocal::texthash( 'err' => "ERROR", @@ -813,9 +813,6 @@ ENDBADAUTH ); $r->print(< - $lt{'err'}: $lt{'uuas'} ($currentauth). $lt{'adcs'}.
@@ -846,7 +843,7 @@ ENDBADAUTH "

$authformint

$authformfsys

"; } $authformcurrent.=' (will override current values)
'; - if (&Apache::lonnet::allowed('mau',$env{'request.role.domain'})) { + if (&Apache::lonnet::allowed('mau',$ccdomain)) { # Current user has login modification privileges my %lt=&Apache::lonlocal::texthash( 'ccld' => "Change Current Login Data", @@ -864,6 +861,19 @@ $loginscript

$lt{'enld'}

$authform_other ENDOTHERAUTHS + } else { + if (&Apache::lonnet::allowed('mau',$env{'request.role.domain'})) { + my %lt=&Apache::lonlocal::texthash( + 'ccld' => "Change Current Login Data", + 'yodo' => "You do not have privileges to modify the authentication configuration for this user.", + 'ifch' => "If a change is required, contact a domain coordinator for the domain", + ); + $r->print(< +

$lt{'ccld'}

+$lt{'yodo'} $lt{'ifch'}: $ccdomain +ENDNOPRIV + } } } ## End of "check for bad authentication type" logic } ## End of new user/old user logic