From adc099ffac688e47a222b7edb2aa3b0c6565eec8 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 17 Dec 2008 10:10:01 +0000 Subject: [PATCH] Updated group mail and kolab 22 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13301 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/mail/kolab/class_mail-methods-kolab22.inc | 9 +++++++++ gosa-plugins/mail/admin/groups/mail/class_groupMail.inc | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab22.inc b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab22.inc index 3a1de4250..3742b7adb 100644 --- a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab22.inc +++ b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab22.inc @@ -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); } diff --git a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc index 78cf45519..735c3de1a 100644 --- a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc +++ b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc @@ -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){ -- 2.30.2