[LON-CAPA-cvs] cvs: loncom /interface loncreateuser.pm

raeburn raeburn at source.lon-capa.org
Fri Nov 3 17:40:22 EDT 2023


raeburn		Fri Nov  3 21:40:22 2023 EDT

  Modified files:              
    /loncom/interface	loncreateuser.pm 
  Log:
  - Bug 5273 Co-authors in "group authoring" accounts managing co-authors
    - If Author has blocked DC access to Authoring Space, DC is also 
      blocked from making changes to which co-authors are managers.
  
  
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.470 loncom/interface/loncreateuser.pm:1.471
--- loncom/interface/loncreateuser.pm:1.470	Fri Nov  3 01:12:15 2023
+++ loncom/interface/loncreateuser.pm	Fri Nov  3 21:40:22 2023
@@ -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 @@
         %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 @@
         } elsif ($item eq 'managers') {
             $output .= '<td'.$colspan.'>'.$custom_access.'</td>'."\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".
                     '<td'.$colspan.'>';
@@ -3227,7 +3230,7 @@
     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 @@
              '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 =




More information about the LON-CAPA-cvs mailing list