summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d72e1f9)
raw | patch | inline | side by side (parent: d72e1f9)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 13 Dec 2006 12:27:57 +0000 (12:27 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 13 Dec 2006 12:27:57 +0000 (12:27 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5382 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/acl/class_aclManagement.inc | patch | blob | history | |
plugins/admin/acl/class_divListACL.inc | patch | blob | history |
index 3d3c5ca1f642e7b07f9ed21cf1dbc582c7e63f0e..9d96d40d11d760771399d9b9d46dbd93fc8c239d 100644 (file)
$Attrs = array("ou","gosaAclEntry","objectClass");
$res = $tmp = array(); // Will contain temporary results
$ldap = $this->config->get_ldap_link();
- $Filter = "(&(objectClass=gosaACL)(gosaAclEntry=*))";
+ $Filter = "(&(objectClass=gosaACL)(gosaAclEntry=*)(|(cn=".$Regex.")(ou=".$Regex.")))";
/* Fetch following structures, this will be used if !$SubSearch */
$fetch_this = array(
$tmp = get_list($Filter, "acl", $fetch_base, $Attrs, $Flags);
}else{
$ldap->cat($fetch_base,$Attrs);
- $tmp = array($ldap->fetch());
+ if($ldap->count()) {
+ $attrs = $ldap->fetch();
+ $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]))){
+
+ $tmp = array($attrs);
+ }
+ }
}
$res = array_merge($res,$tmp);
}
index dbfe2434d588aeba773d7d0f0ea3ec9749656b12..f61378f6f13f6d66a896b56fac6f2e409b366c21 100644 (file)
$this->set_filter_objectclasses();
/* Add SubSearch checkbox */
- $this->AddCheckBox(SEPERATOR);
$this->AddCheckBox("SubSearch", _("Select to search within subtrees"), _("Ignore subtrees"), false);
/* Name ,Text ,Default , Connect with alphabet */
- $this->AddRegex ("Regex", _("Display acls matching"),"Not implemented yet" , true);
+ $this->AddRegex ("Regex", _("Display acls matching"),"*" , true);
}
/* Add some additional checkboxes to the filter part, this should be generated dynamically. */
function set_filter_objectclasses()
{
- #FIXME This should be created dynamically
- $this->gosaAccount = true;
- $this->AddCheckBox("gosaAccount", _("Select to display users"), _("Display user") , true);
- $this->gosaDepartment = true;
- $this->AddCheckBox("gosaDepartment", _("Select to display departments"), _("Display departments"), true);
}
-
/* Return objectClass names used in filter part */
function get_filter_objectclasses()