summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f338b39)
raw | patch | inline | side by side (parent: f338b39)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 9 Apr 2008 07:24:35 +0000 (07:24 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 9 Apr 2008 07:24:35 +0000 (07:24 +0000) |
-Fixed user target selection. Updated ldap search filter to search for uids too.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10290 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10290 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/sudo/admin/sudo/class_target_list_users.inc | patch | blob | history |
diff --git a/gosa-plugins/sudo/admin/sudo/class_target_list_users.inc b/gosa-plugins/sudo/admin/sudo/class_target_list_users.inc
index 1640c3d74ebe16c9297d0574fb1e2eea86cbc133..34cc1e810d745e3b649841446a0dfc92fbd7e452 100644 (file)
var $user ;
var $group ;
-
/* Subsearch checkbox */
var $SubSearch ;
var $parent ;
var $ui ;
-
-
+
function target_list_users(&$config,$Targets_used)
{
MultiSelectWindow::MultiSelectWindow($config, "Targetselection", array("users"));
- $this->Targets_used = $Targets_used;
-
+ $this->Targets_used = $Targets_used;
+
$this->SetInformation( _("Select the target objects"));
$this->SetTitle( _("Available targets"));
$this->SetSummary( _("Available targets"));
$this->SetHeadpageMode(FALSE);
-
+
/* set Page header */
$chk = "<input type='checkbox' id='select_all' name='select_all'
- onClick='toggle_all_(\"^item_selected_[0-9]*$\",\"select_all\");' >";
+ onClick='toggle_all_(\"^item_selected_[0-9]*$\",\"select_all\");' >";
$this->AddHeader(array("string"=> $chk, "attach"=>"style='width:20px;'"));
$this->AddHeader(array("string" => " ", "attach" => "style='text-align:center;width:20px;'"));
$tmp = array();
$tmp[] = array("dn"=>$this->config->current['BASE']);
$tmp= array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
- array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH));
+ array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH));
$deps = array();
foreach($tmp as $tm){
return($this->Draw());
}
-
+
function SetEntries($list)
{
- /* Add Copy & Paste buttons if copy&paste is enabled
+ /* Add Copy & Paste buttons if copy&paste is enabled
*/
// Defining Links
$linkopen = "<a href='?plug=".$_GET['plug']."&act=dep_open&dep_id=%s'>%s</a>";
/* Create each field */
$field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
- "attach" => "style='width:20px;'");
+ "attach" => "style='width:20px;'");
$field1 = array("string" => $img,
- "attach" => "style='text- align:center;width: 20px;'");
+ "attach" => "style='text- align:center;width: 20px;'");
$field2 = array("string" => $val['cn'][0].$desc,
- "attach" => "style='border-right:0px;' ".$title);
+ "attach" => "style='border-right:0px;' ".$title);
$this->AddElement(array($field0,$field1,$field2));
}
}
-
+
function save()
{
$ret = array();
MultiSelectWindow::save_object();
}
-
+
function reload()
{
/* Set base for all searches && initialise some vars */
$this->list= array();
$base = $this->selectedBase;
- $filter = "(&(objectClass=person)(objectClass=gosaAccount))";
$Regex = $this->Regex;
/* Create filter */
- $filter= "(&(cn=".$Regex.")(|".$filter."))";
if($this->SubSearch){
$res = array();
if($this->user){
$filter = "(&(objectClass=person)(objectClass=gosaAccount))";
- $filter= "(&(cn=".$Regex.")(|".$filter."))";
+ $filter= "(&(|(cn=".$Regex.")(uid=".$Regex."))(|".$filter."))";
$res= array_merge($res,get_sub_list($filter, array("users"), array(get_people_ou()),$base,
array("cn","uid","objectClass","description"), GL_SIZELIMIT | GL_SUBSEARCH));
}
if($this->group){
$filter = "(objectClass=posixGroup)";
- $filter= "(&(cn=".$Regex.")(|".$filter."))";
+ $filter= "(&(|(cn=".$Regex.")(uid=".$Regex."))(|".$filter."))";
$res= array_merge($res,get_sub_list($filter, array("groups"), array(get_groups_ou()),$base,
array("cn","uid","objectClass","description"), GL_SIZELIMIT | GL_SUBSEARCH));
}
}else{
$res= get_list($filter, array("users"), get_people_ou().$base,
- array("cn","uid","objectClass","description"), GL_SIZELIMIT );
+ array("cn","uid","objectClass","description"), GL_SIZELIMIT );
$res = array();
if($this->user){
$filter = "(&(objectClass=person)(objectClass=gosaAccount))";
- $filter= "(&(cn=".$Regex.")(|".$filter."))";
+ $filter= "(&(|(cn=".$Regex.")(uid=".$Regex."))(|".$filter."))";
$res= array_merge($res,get_list($filter, array("users"), get_people_ou().$base,
array("cn","uid","objectClass","description"), GL_SIZELIMIT ));
}
if($this->group){
$filter = "(objectClass=posixGroup)";
- $filter= "(&(cn=".$Regex.")(|".$filter."))";
+ $filter= "(&(|(cn=".$Regex.")(uid=".$Regex."))(|".$filter."))";
$res= array_merge($res,get_list($filter, array("groups"), get_groups_ou().$base,
array("cn","uid","objectClass","description"), GL_SIZELIMIT ));
}
}
}
-
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>