--- loncom/interface/loncreateuser.pm 2002/04/22 18:04:19 1.32
+++ loncom/interface/loncreateuser.pm 2003/03/23 09:02:38 1.50
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.32 2002/04/22 18:04:19 matthew Exp $
+# $Id: loncreateuser.pm,v 1.50 2003/03/23 09:02:38 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -44,10 +44,9 @@
# 2/14,2/17,2/19,2/20,2/21,2/22,2/23,3/2,3/17,3/24,04/12 Gerd Kortemeyer
# April Guy Albertelli
# 05/10,10/16 Gerd Kortemeyer
-# 11/12,11/13,11/15 Scott Harrison
# 02/11/02 Matthew Hall
#
-# $Id: loncreateuser.pm,v 1.32 2002/04/22 18:04:19 matthew Exp $
+# $Id: loncreateuser.pm,v 1.50 2003/03/23 09:02:38 albertel Exp $
###
package Apache::loncreateuser;
@@ -71,32 +70,59 @@ BEGIN {
my %param = ( formname => 'document.cu',
kerb_def_dom => $krbdefdom
);
- $loginscript = &Apache::loncommon::authform_header(%param);
+# no longer static due to configurable kerberos defaults
+# $loginscript = &Apache::loncommon::authform_header(%param);
$generalrule = &Apache::loncommon::authform_authorwarning(%param);
$authformnop = &Apache::loncommon::authform_nochange(%param);
- $authformkrb = &Apache::loncommon::authform_kerberos(%param);
+# no longer static due to configurable kerberos defaults
+# $authformkrb = &Apache::loncommon::authform_kerberos(%param);
$authformint = &Apache::loncommon::authform_internal(%param);
$authformfsys = &Apache::loncommon::authform_filesystem(%param);
$authformloc = &Apache::loncommon::authform_local(%param);
}
+
+
+# ==================================================== Figure out author access
+
+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 ''; }
+ return 1;
+}
+
# =================================================================== Phase one
-sub phase_one {
+sub print_username_entry_form {
my $r=shift;
- my $defdom=$ENV{'user.domain'};
- $r->print(<Create User, Change User Privileges
-