From: hickert Date: Wed, 17 Dec 2008 12:02:49 +0000 (+0000) Subject: Added member info to group mail X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7ff55052c4297138f0e9368d6f0c91d2d2357115;p=gosa.git Added member info to group mail git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13305 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc index 0d64e10c0..3965203a2 100644 --- a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc +++ b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc @@ -44,6 +44,7 @@ class mailgroup extends plugin var $uid = ""; var $cn =""; var $orig_cn = ""; + var $show_effective_memeber = FALSE; function __construct (&$config, $dn= NULL, $ui= NULL) { @@ -254,7 +255,7 @@ class mailgroup extends plugin $this->view_logged = TRUE; new log("view","groups/".get_class($this),$this->dn); } - + /**************** Account status ****************/ @@ -422,6 +423,8 @@ class mailgroup extends plugin $smarty->assign("mailEqualsCN", $this->mailMethod->mailEqualsCN()); $smarty->assign("folder_acls" , $this->postable_acls()); $smarty->assign("AclTypes" , $this->AclTypes); + $smarty->assign("Effective", $this->get_effective_member_acls()); + $smarty->assign("show_effective_memeber", $this->show_effective_memeber); $smarty->assign("quotaEnabled", $this->mailMethod->quotaEnabled()); if($this->mailMethod->quotaEnabled()){ @@ -572,6 +575,10 @@ class mailgroup extends plugin } if (isset($_POST['mailedit'])){ + if(isset($_POST['show_effective_memeber'])){ + $this->show_effective_memeber = !$this->show_effective_memeber; + } + $mail = $this->mail; $server = $this->gosaMailServer; plugin::save_object(); @@ -1254,7 +1261,25 @@ class mailgroup extends plugin return($ret); } - + + function get_effective_member_acls() + { + $tmp = array(); + $member = $this->get_member(); + foreach($member['mail'] as $uid => $mail){ + + /* Do not save overridden acls */ + if(isset($this->folder_acls[$mail])){ + continue; + } + + + $tmp[$mail] = $this->folder_acls['__member__']; + } + return($tmp); + } + + function allow_remove() { $resason = ""; diff --git a/gosa-plugins/mail/admin/groups/mail/mail.tpl b/gosa-plugins/mail/admin/groups/mail/mail.tpl index 1d73a9d1b..f1fac33ba 100644 --- a/gosa-plugins/mail/admin/groups/mail/mail.tpl +++ b/gosa-plugins/mail/admin/groups/mail/mail.tpl @@ -158,9 +158,23 @@ {/if} {/render} + {if $user == "__member__"} + {if $show_effective_memeber} + + {else} + + {/if} + {/if} + {if $user == "__member__" && $show_effective_memeber} + {foreach from=$Effective item=i key=k} +   {$k} + {/foreach} + {/if} {/foreach} + +