Code

Updated ACL modification
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 29 Oct 2008 09:59:14 +0000 (09:59 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 29 Oct 2008 09:59:14 +0000 (09:59 +0000)
-The last object ACLs wasn't removed.

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

gosa-core/include/class_acl.inc

index 0ddb62128e3098e637558b6bb2a7e029669fa0c6..f0b2af9ceba5f478c592cdecb7272ddd061bf040 100644 (file)
@@ -308,7 +308,6 @@ class acl extends plugin
 
       /* ACL saving... */
       if (preg_match('/^acl_.*_[^xy]$/', $name)){
-        $aclDialog= TRUE;
         list($dummy, $object, $attribute, $value)= split('_', $name);
 
         /* Skip for detection entry */
@@ -333,6 +332,10 @@ class acl extends plugin
       }
     }
 
+    if(isset($_POST['acl_dummy_0_0_0'])){
+      $aclDialog= TRUE;
+    }
+
     if($this->acl_is_writeable("")){
       
       /* Only be interested in new acl's, if we're in the right _POST place */
@@ -342,6 +345,7 @@ class acl extends plugin
 
           if(isset($this->aclContents[$oc]) && is_array($this->aclContents)){
             unset($this->aclContents[$oc]);
+          }elseif(isset($this->aclContents[$this->aclObject.'/'.$oc]) && is_array($this->aclContents)){
             unset($this->aclContents[$this->aclObject.'/'.$oc]);
           }else{
 #          trigger_error("Huhm?");