Code

Fixed ACL handling for gw
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 8 Sep 2010 09:37:00 +0000 (09:37 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 8 Sep 2010 09:37:00 +0000 (09:37 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19561 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/personal/groupware/class_groupware.inc

index 27c00a8b468ec7ae81c6302c18d342bc6cc39d4e..866144dc53059ca491de0e2856a6b179deb18a17 100644 (file)
@@ -35,9 +35,6 @@ class groupware extends plugin
 
     var $enabledFeatures = array();
 
-    var $flagAttributes = array("vacationEnabled","mailBoxWarnLimitEnabled","mailBoxSendSizelimitEnabled",
-            "mailBoxHardSizelimitEnabled","mailBoxAutomaticRemovalEnabled","localDeliveryOnly","dropOwnMails");
-
     var $mailAddressSelectDialog = NULL;
     var $filterManager = NULL;
     var $filterRules = array();
@@ -426,15 +423,32 @@ class groupware extends plugin
             }
 
             // Get ui modifications and store them in the class.
-            foreach($this->attributes as $attr){
+            $testAttrs = array("mailAddress","mailLocation","quotaUsage","quotaSize",
+                    "alternateAddresses","forwardingAddresses","vacationEnabled","vacationStart",
+                    "vacationStop","vacationMessage");
+            foreach($testAttrs as $attr){
                 if(isset($_POST[$attr]) && $this->acl_is_writeable($attr)){
                     $this->$attr = get_post($attr);
                 }
             }
 
-            echo 'ACL checks missing!';
+            // Detect checkbox states 
+            $checkAttrs = array("mailBoxWarnLimit","mailBoxSendSizelimit",
+                    "mailBoxHardSizelimit","mailBoxAutomaticRemoval");
+            foreach($checkAttrs as $boxname){
+                if($this->acl_is_writeable($boxname)){
+                    $v = $boxname."Value"; 
+                    $e = $boxname."Enabled"; 
+                    $this->$e = isset($_POST[$e]);
+                    if($this->$e){
+                        $this->$v = get_post($v);
+                    }
+                }
+            }
 
-            foreach($this->flagAttributes as $attr){
+            // Get posted flag changes 
+            $flagAttrs = array("localDeliveryOnly","dropOwnMails");
+            foreach($flagAttrs as $attr){
                 $this->$attr = isset($_POST[$attr]);
             }
         }