Code

Updated group mail and kolab 22
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Dec 2008 10:10:01 +0000 (10:10 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Dec 2008 10:10:01 +0000 (10:10 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13301 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab22.inc
gosa-plugins/mail/admin/groups/mail/class_groupMail.inc

index 3a1de4250eae90fcf9da20b154fa849e7bbb43ee..3742b7adbbb50c8641f2cd33f36728caa66af62b 100644 (file)
@@ -58,6 +58,15 @@ class mailMethodKolab22 extends mailMethodKolab
       }
     }
 
+    /* Merge given ACL with acl mapping
+       This ensures that no ACL will accidentally overwritten by gosa.
+     */
+    foreach($ldap_acls as $user => $acl){
+      if(!isset($this->acl_mapping[$acl])){
+        $this->acl_mapping[$acl] = $acl;
+      }
+    }
+
     return($ldap_acls);
   }
 
index 78cf45519b046ad64a9b367e00d8d5f1f79fcc1c..735c3de1a49b1ddf0218b0bd64fad9abc9277db1 100644 (file)
@@ -172,10 +172,12 @@ class mailgroup extends plugin
      */
     if(count($this->folder_acls) > 2){
       $acl_usage = array();
-      $most_acl = "";
+      $most_acl = $this->folder_acls['__member__'];
       $most_cnt = 0;
       $member = $this->get_member();
       foreach($this->folder_acls as $user => $acl){
+        if(preg_match("/^__/",$user)) continue;
+        if(!in_array($user,$member['mail'])) continue; 
         if(!isset($acl_usage[$acl])) $acl_usage[$acl]=0;
         $acl_usage[$acl] ++;
         if($acl_usage[$acl] > $most_cnt){