[LON-CAPA-cvs] cvs: loncom(version_2_5_X) /interface loncreateuser.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Wed, 03 Oct 2007 13:45:59 -0000
albertel Wed Oct 3 09:45:59 2007 EDT
Modified files: (Branch: version_2_5_X)
/loncom/interface loncreateuser.pm
Log:
- backport 1.186
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.184 loncom/interface/loncreateuser.pm:1.184.2.1
--- loncom/interface/loncreateuser.pm:1.184 Wed Sep 12 19:26:25 2007
+++ loncom/interface/loncreateuser.pm Wed Oct 3 09:45:58 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.184 2007/09/12 23:26:25 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.184.2.1 2007/10/03 13:45:58 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1014,11 +1014,8 @@
$loginscript = &Apache::loncommon::authform_header(%param);
}
# Check for a bad authentication type
- unless ($currentauth=~/^krb(4|5):/ or
- $currentauth=~/^unix:/ or
- $currentauth=~/^internal:/ or
- $currentauth=~/^localauth:/
- ) { # bad authentication scheme
+ if ($currentauth !~ /^(krb4|krb5|unix|internal|localauth):/) {
+ # bad authentication scheme
if (&Apache::lonnet::allowed('mau',$ccdomain)) {
&initialize_authen_forms();
my %lt=&Apache::lonlocal::texthash(
@@ -1113,11 +1110,22 @@
ENDNOPRIV
}
}
- if (&Apache::lonnet::allowed('mpq',$env{'request.role.domain'})) {
- # Current user has quota modification privileges
- $r->print(&portfolio_quota($ccuname,$ccdomain));
- }
} ## End of "check for bad authentication type" logic
+ if (&Apache::lonnet::allowed('mpq',$ccdomain)) {
+ # Current user has quota modification privileges
+ $r->print(&portfolio_quota($ccuname,$ccdomain));
+ } elsif (&Apache::lonnet::allowed('mpq',$env{'request.role.domain'})) {
+ my %lt=&Apache::lonlocal::texthash(
+ 'dska' => "Disk space allocated to user's portfolio files",
+ 'youd' => "You do not have privileges to modify the portfolio quota for this user.",
+ 'ichr' => "If a change is required, contact a domain coordinator for the domain",
+ );
+ $r->print(<<ENDNOPORTPRIV);
+<hr />
+<h3>$lt{'dska'}</h3>
+$lt{'youd'} $lt{'ichr'}: $ccdomain
+ENDNOPORTPRIV
+ }
} ## End of new user/old user logic
$r->print('<hr /><h3>'.&mt('Add Roles').'</h3>');
#