Code

Fixed userPassword change
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 16 Nov 2006 06:04:39 +0000 (06:04 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 16 Nov 2006 06:04:39 +0000 (06:04 +0000)
Fixed acls for user mail.

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

plugins/admin/users/class_userManagement.inc
plugins/personal/mail/class_mailAccount.inc
plugins/personal/mail/generic.tpl

index 5d56063f93f97678ea368f29b25f36599a3da63d..ce9b646ccc3fa79c16063069ae9fe996f9586fff 100644 (file)
@@ -210,7 +210,6 @@ class userManagement extends plugin
       $acl = $this->ui->get_permissions($dn, "users/password");
       $cacl= $this->ui->get_permissions($dn, "users/user");
 
-
       if (preg_match('/w/', $acl) || preg_match('/c/', $cacl)){
 
         /* Check input and feed errors into 'message' */
@@ -402,6 +401,7 @@ class userManagement extends plugin
 
           /* In case of new users, ask for a password, skip this for templates */
           if (($set_pass || $this->usertab->password_change_needed()) && !$this->is_template){
+            $this->dn = $this->usertab->dn;
             return($smarty->fetch(get_template_path('password.tpl', TRUE)));
           }
 
index 327f9069006c59e5ce1747e3f3aa8d673206a5f3..a2d25996817e375f83453d32b3f9b99ecddac489 100644 (file)
@@ -520,16 +520,16 @@ class mailAccount extends plugin
 
 
     if (!preg_match("/L/", $this->gosaMailDeliveryMode)) {
-      $smarty->assign("drop_own_mails", "checked");
+      $smarty->assign("only_local", "checked");
     } else {
-      $smarty->assign("drop_own_mails", "");
+      $smarty->assign("only_local", "");
     }
 
     $types = array(
           "V"=>"use_vacation",
           "S"=>"use_spam_filter",
           "R"=>"use_mailsize_limit",
-          "I"=>"only_local",
+          "I"=>"drop_own_mails",
           "C"=>"own_script");
 
     /* Fill checkboxes */
@@ -652,11 +652,11 @@ class mailAccount extends plugin
       $tmp= preg_replace("/[^a-z]/i","",$this->gosaMailDeliveryMode);
 
 
-      /* Handle delivery flags */ 
+      /* Handle delivery flags */
       if($this->acl_is_writeable("gosaMailDeliveryModeL")){
-        if(!preg_match("/L/",$tmp) && !isset($_POST['drop_own_mails'])){
+        if(!preg_match("/L/",$tmp) && !isset($_POST['only_local'])){
           $tmp.="L";
-        }elseif(preg_match("/L/",$tmp) && isset($_POST['drop_own_mails'])){
+        }elseif(preg_match("/L/",$tmp) && isset($_POST['only_local'])){
           $tmp = preg_replace("/L/","",$tmp);
         }
       }
@@ -666,7 +666,7 @@ class mailAccount extends plugin
           "S"   => "use_spam_filter",
           "V"   => "use_vacation",
           "C"   => "own_script",
-          "I"   => "only_local");
+          "I"   => "drop_own_mails");
 
       foreach($opts as $flag => $post){
         if($this->acl_is_writeable("gosaMailDeliveryMode".$flag)){
@@ -1020,7 +1020,7 @@ class mailAccount extends plugin
             "gosaMailDeliveryModeV"     =>  _("Add vacation information"),  // This is flag of gosaMailDeliveryMode
             "gosaVacationMessage"       =>  _("Vacation message"),
 
-            "gosaMailDeliveryModes"     =>  _("Use spam filter"),           // This is flag of gosaMailDeliveryMode
+            "gosaMailDeliveryModeS"     =>  _("Use spam filter"),           // This is flag of gosaMailDeliveryMode
             "gosaSpamSortLevel"         =>  _("Spam level"),
             "gosaSpamMailbox"           =>  _("Spam mail box"),
 
@@ -1029,7 +1029,7 @@ class mailAccount extends plugin
 
             "gosaMailForwardingAddress" =>  _("Forwarding address"),
             "gosaMailDeliveryModeL"     =>  _("Local delivery"),            // This is flag of gosaMailDeliveryMode
-            "gosaMailDeliveryModeI"     =>  _("Only insider delivery"),     // This is flag of gosaMailDeliveryMode
+            "gosaMailDeliveryModeI"     =>  _("No delivery to own mailbox "),     // This is flag of gosaMailDeliveryMode
             "gosaMailAlternateAddress"  =>  _("Mail alternative addresses"),
 
             "gosaMailForwardingAddress" =>  _("Forwarding address"),
index deb737ffaca8699efaa5ca4398d16f9ffce175b1..157f739b3139797a963c0aa96210db9bd4c68d38 100644 (file)
@@ -93,7 +93,7 @@
    &nbsp;
   </td>
   <td style="vertical-align:top;">
-{render acl=$gosaMailDeliveryModesACL}
+{render acl=$gosaMailDeliveryModeSACL}
    <input type=checkbox name="use_spam_filter" value="1" {$use_spam_filter} title="{t}Select if you want to filter this mails through spamassassin{/t}">
 {/render}
  <label for="gosaSpamSortLevel">{t}Move mails tagged with spam level greater than{/t}</label>