Code

Updated Group-Mail
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 Jul 2008 08:43:11 +0000 (08:43 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 Jul 2008 08:43:11 +0000 (08:43 +0000)
-Keep selected Mail-Server selected, also if we have no permissions to read to current server settings.
-Fixed typo in msgPool::requied

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

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

index f1772367af9bbd89b89513cbb81dc0556683ff14..55a2c2a49eb918b4788dc3724a14ed262f7f87e3 100644 (file)
@@ -636,9 +636,19 @@ class mailgroup extends plugin
 
     /* Show main page */
     $mailserver= array();
+    $ui = get_userinfo();
     foreach ($this->config->data['SERVERS']['IMAP'] as $key => $val){
+      if(!preg_match("/r/",$ui->get_category_permissions($val['server_dn'],"server"))) continue;
       $mailserver[]= $key;
     }
+
+    /* Append currently selected server if we are not allowed to view it. 
+     */
+    if(isset($this->config->data['SERVERS']['IMAP'][$this->gosaMailServer]) && 
+        !in_array($this->gosaMailServer,$mailserver)){
+      $mailserver[] = $this->gosaMailServer;
+    }
+
     $smarty->assign("mailServers", $mailserver);
     foreach(array("gosaMailServer", "gosaMailQuota", "perms", "mail",
           "gosaMailAlternateAddress", "gosaMailForwardingAddress") as $val){
@@ -1072,7 +1082,7 @@ I: Only insider delivery */
     }
 
     if(empty($this->gosaMailServer)){
-      $message[] = msgPool::requried(_("Mail server"));
+      $message[] = msgPool::required(_("Mail server"));
     }
 
     return ($message);