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

raeburn raeburn at source.lon-capa.org
Sun Jan 12 19:57:39 EST 2025


raeburn		Mon Jan 13 00:57:39 2025 EDT

  Modified files:              
    /loncom/interface	lonuserutils.pm 
  Log:
  - Domain settings for updateable user information for non-DC users only 
    in effect if (i) user's domain is same as current domain context, or (ii) 
    if user making the changes has the same domain as the user.
  
  
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.223 loncom/interface/lonuserutils.pm:1.224
--- loncom/interface/lonuserutils.pm:1.223	Sun Jan 12 23:34:20 2025
+++ loncom/interface/lonuserutils.pm	Mon Jan 13 00:57:39 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Utility functions for managing LON-CAPA user accounts
 #
-# $Id: lonuserutils.pm,v 1.223 2025/01/12 23:34:20 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.224 2025/01/13 00:57:39 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -6699,6 +6699,10 @@
             $canmodify{$field}  = 0;
             if (&Apache::lonnet::allowed('mau',$dom)) {
                 $canmodify{$field} = 1;
+            } elsif (($context ne 'selfcreate') &&
+                     ($env{'request.role.dom'} ne $dom) &&
+                     ($env{'user.domain'} ne $dom)) {
+                $canmodify{$field} = 0;
             } else {
                 if (ref($domconfig{'usermodification'}) eq 'HASH') {
                     if (ref($domconfig{'usermodification'}{$context}) eq 'HASH') {




More information about the LON-CAPA-cvs mailing list