Code

Added ACL check to personal mail account-
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jul 2008 13:08:02 +0000 (13:08 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jul 2008 13:08:02 +0000 (13:08 +0000)
-Avoid selection of mail servers we are not allowed to view, but keep already selected server.

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

gosa-plugins/mail/personal/mail/class_mailAccount.inc

index f2f332f208a8f62b2b430e1c73a0631c951f194e..61982e467320110c3cf5db3b077a3c7f5460b96b 100644 (file)
@@ -241,8 +241,12 @@ class mailAccount extends plugin
 
     /* Get available mailserver */
     $mailserver= array();
+    $ui = get_userinfo();
     foreach ($this->config->data['SERVERS']['IMAP'] as $key => $val){
-      $mailserver[]= $key;
+      if( $this->gosaMailServer == $key || 
+          preg_match("/r/",$ui->get_permissions($val['server_dn'],"server/goImapServer",""))){
+        $mailserver[]= $key;
+      }
     }
 
     /*