Code

Updated mail group
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Dec 2008 10:51:27 +0000 (10:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Dec 2008 10:51:27 +0000 (10:51 +0000)
-Don't save acls twice

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13304 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/admin/groups/mail/class_groupMail.inc

index 735c3de1a49b1ddf0218b0bd64fad9abc9277db1..0d64e10c0a978b28b7f2d9902f643f52fbb338c1 100644 (file)
@@ -255,8 +255,6 @@ class mailgroup extends plugin
       new log("view","groups/".get_class($this),$this->dn);
     }
 
-    $this->get_member();
     /****************
       Account status
      ****************/
@@ -720,6 +718,12 @@ class mailgroup extends plugin
     $member = $this->get_member();
     $new_folder_acls = array("anyone" => $this->folder_acls['__anyone__']);
     foreach($member['mail'] as $uid => $mail){
+
+      /* Do not save overridden acls */
+      if(isset($this->folder_acls[$mail])){
+        continue;
+      }
+
       $this->acl[] = $mail." ".$this->folder_acls['__member__'];
       $new_folder_acls[$mail]=$this->folder_acls['__member__'];
     }
@@ -730,7 +734,7 @@ class mailgroup extends plugin
     }
     $this->folder_acls = $new_folder_acls;
     $this->acl = array_unique($this->acl);
-      
+     
     /* Call parents save to prepare $this->attrs */
     plugin::save();