Code

Updated ACL detection.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 18 Aug 2008 07:53:42 +0000 (07:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 18 Aug 2008 07:53:42 +0000 (07:53 +0000)
- There was a hard coded ou= inside the regex, but we may have an empty group container object defined. groups=""

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

include/class_userinfo.inc

index 0715c700889cf8fd52a10fc31f1bb2d79a4b5705..85538a5b042a581d875caf51cee85bbe1a097699 100644 (file)
@@ -84,8 +84,8 @@ class userinfo
     }
 
     while($attrs = $ldap->fetch()){
-      $base= preg_replace('/^[^,]+,ou=[^,]+,/i', "",$ldap->getDN());
-      $base= preg_replace("/[ ]*,[ ]*/", ",", $base);
+      $base= preg_replace('/^[^,]*+,'.normalizePreg(get_groups_ou()).'/i', "",$ldap->getDN());
+      $base= preg_replace("/\s*,\s*/", ",", $base);
 
       for ($i= 0; $i<$attrs["gosaSubtreeACL"]["count"]; $i++){
         $this->subtreeACL[$base][]= $attrs["gosaSubtreeACL"][$i];