--- loncom/interface/loncreateuser.pm 2023/11/03 01:12:15 1.470
+++ loncom/interface/loncreateuser.pm 2023/11/03 21:40:22 1.471
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.470 2023/11/03 01:12:15 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.471 2023/11/03 21:40:22 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -324,7 +324,8 @@ sub build_tools_display {
%domconfig =
&Apache::lonnet::get_dom('configuration',['quotas','authordefaults'],$ccdomain);
%userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,'tools.webdav',
- 'authoreditors','authormanagers');
+ 'authoreditors','authormanagers',
+ 'domcoord.author');
@usertools = ('webdav','editors','managers');
$colspan = ' colspan="2"';
} else {
@@ -590,7 +591,9 @@ sub build_tools_display {
} elsif ($item eq 'managers') {
$output .= '
'.$custom_access.' | '."\n".
&Apache::loncommon::end_data_table_row()."\n";
- unless (&Apache::lonnet::allowed('udp',$ccdomain)) {
+ unless ((&Apache::lonnet::allowed('udp',$ccdomain)) ||
+ (($userenv{'domcoord.author'} eq 'blocked') &&
+ (($env{'user.name'} ne $ccuname) || ($env{'user.domain'} ne $ccdomain)))) {
$output .=
&Apache::loncommon::start_data_table_row()."\n".
'';
@@ -3227,7 +3230,7 @@ sub update_user_data {
my @usertools = ('aboutme','blog','portfolio','portaccess','timezone');
my @requestcourses = ('official','unofficial','community','textbook','placement','lti');
my @requestauthor = ('requestauthor');
- my @authordefaults = ('webdav','editors','managers');
+ my @authordefaults = ('webdav','editors');
my ($othertitle,$usertypes,$types) =
&Apache::loncommon::sorted_inst_types($env{'form.ccdomain'});
my %canmodify_status =
@@ -3432,12 +3435,17 @@ sub update_user_data {
'requestcourses.placement','requestcourses.lti',
'reqcrsotherdom.official','reqcrsotherdom.unofficial',
'reqcrsotherdom.community','reqcrsotherdom.textbook',
- 'reqcrsotherdom.placement'],
+ 'reqcrsotherdom.placement','domcoord.author'],
$env{'form.ccdomain'},$env{'form.ccuname'});
my ($tmp) = keys(%userenv);
if ($tmp =~ /^(con_lost|error)/i) {
%userenv = ();
}
+ unless (($userenv{'domcoord.author'} eq 'blocked') &&
+ (($env{'user.name'} ne $env{'form.ccuname'}) ||
+ ($env{'user.domain'} ne $env{'form.ccdomain'}))) {
+ push(@authordefaults,'managers');
+ }
my $no_forceid_alert;
# Check to see if user information can be changed
my %domconfig =
|