Code

Updated ACL check.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Jun 2008 13:26:24 +0000 (13:26 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Jun 2008 13:26:24 +0000 (13:26 +0000)
- Cleanup ACLs only if we reached a new department level.

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

gosa-core/include/class_userinfo.inc

index 957dc78f6b5fd4b69cb8f7f02ed7900908549d2a..2a459c88afe3bf8cac9502a501b87912bfe1dad2 100644 (file)
@@ -314,15 +314,18 @@ class userinfo
     $cpath= "";
     foreach ($path as $element){
 
+      /* Clean potential ACLs for each level */
+      if(in_array($cpath,$this->config->departments)){
+        $acl= $this->cleanACL($acl);
+      }
+
       if ($cpath == ""){
         $cpath= $element;
       } else {
         $cpath= $element.','.$cpath;
       }
-      if (isset($this->ACL[$cpath])){
 
-        /* Clean potential ACLs for each level */
-        $acl= $this->cleanACL($acl);
+      if (isset($this->ACL[$cpath])){
 
         /* Inspect this ACL, place the result into ACL */
         foreach ($this->ACL[$cpath] as $subacl){