From: hickert Date: Thu, 3 May 2007 07:15:13 +0000 (+0000) Subject: Fixed acl management base handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=342ecd1caba18df3e8a3793824f2a15e9e8aae88;p=gosa.git Fixed acl management base handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6241 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/acl/class_aclManagement.inc b/plugins/admin/acl/class_aclManagement.inc index d5ed80847..8b3ccd1c2 100644 --- a/plugins/admin/acl/class_aclManagement.inc +++ b/plugins/admin/acl/class_aclManagement.inc @@ -496,12 +496,17 @@ class aclManagement extends plugin } }else{ $ldap->cat($fetch_base,$Attrs); - if($ldap->count()) { - $attrs = $ldap->fetch(); + $attrs = $ldap->fetch(); + if($attrs && isset($attrs['gosaAclEntry'])){ $re2 = preg_replace("/\*/",".*",$Regex); - if( (isset($attrs['cn'][0]) && preg_match("/".$re2."/i",$attrs['cn'][0])) - |(isset($attrs['ou'][0]) && preg_match("/".$re2."/i",$attrs['ou'][0]))){ + if(!isset($attrs['ou']) && !isset($attrs['cn'])){ + $namingAttr= preg_replace("/^[^=]*+=([^,]*),.*$/","\\1",$fetch_base); + if(preg_match("/".$re2."/i",$namingAttr)){ + $res[] = $attrs; + } + }elseif( (isset($attrs['cn'][0]) && preg_match("/".$re2."/i",$attrs['cn'][0])) + ||(isset($attrs['ou'][0]) && preg_match("/".$re2."/i",$attrs['ou'][0]))){ $res[] = $attrs; } } diff --git a/plugins/admin/acl/class_divListACL.inc b/plugins/admin/acl/class_divListACL.inc index c44cdcdd2..3324d970f 100644 --- a/plugins/admin/acl/class_divListACL.inc +++ b/plugins/admin/acl/class_divListACL.inc @@ -96,6 +96,7 @@ class divListACL extends MultiSelectWindow $value = $ids[$dep['dn']]; if ($this->selectedBase == $dep['dn']){ + $found = TRUE; $options.= ""; } else { $options.= "";