Code

Updated mailAccount, prevent user from changing their mail server or address settings
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 9 Dec 2008 08:00:38 +0000 (08:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 9 Dec 2008 08:00:38 +0000 (08:00 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13195 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index b0d992cdda1bde5fbbca1749695ef0a8512080d4..2f5ad1052bb9af3b2c5bae4847bf8bc41173e275 100644 (file)
@@ -361,6 +361,10 @@ class mailAccount extends plugin
       SMARTY- Assign smarty variables 
      ****************/
     $smarty = get_smarty();
+    $smarty->assign("initially_was_account", $this->initially_was_account);
+    $smarty->assign("isModifyableMail", $this->mailMethod->isModifyableMail());
+    $smarty->assign("mailEqualsCN", $this->mailMethod->mailEqualsCN());
+
     $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::is_set('edit');
     $tmp  = $this->plInfo();
     foreach($tmp['plProvidedAcls'] as $name => $transl){
index bb67e4cb5b043d9681440f78bd0c84268077f4ab..928909ecf00976f4f27a21a9ed64d77a63107a4c 100644 (file)
@@ -8,6 +8,9 @@
     <tr>
      <td><label for="mail">{t}Primary address{/t}</label>{$must}</td>
      <td>
+     {if !$isModifyableMail && $initially_was_account}
+               <input disabled size=30 value="{$mail}">
+     {else}
         {if $domainSelectionEnabled}
                {render acl=$mailACL}
                        <input id="mail" name="mail" size=20 maxlength=65 value="{$mail}">
             <input id="mail" name="mail" size=35 maxlength=65 value="{$mail}">
         {/render}
        {/if}
+       {/if}
      </td>
     </tr>
     <tr>
      <td><label for="gosaMailServer">{t}Server{/t}</label></td>
      <td>
+     {if !$isModifyableMail && $initially_was_account}
+        <input disabled size=30 value="{$gosaMailServer}">
+     {else}
+
 {render acl=$gosaMailServerACL}
       <select size="1" id="gosaMailServer" name="gosaMailServer" title="{t}Specify the mail server where the user will be hosted on{/t}">
                {html_options values=$MailServers output=$MailServers selected=$gosaMailServer}
                <option disabled>&nbsp;</option>
       </select>
 {/render}
+     {/if}
      </td>
     </tr>
 {/if}