From 7fc8a5924533385bf2ee280f62cb2601504806d5 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 6 Sep 2006 04:23:12 +0000 Subject: [PATCH] fixed base selection git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4598 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/groups/class_groupGeneric.inc | 31 +++++++-------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc index 5d4e37da1..b57e4c1d2 100644 --- a/plugins/admin/groups/class_groupGeneric.inc +++ b/plugins/admin/groups/class_groupGeneric.inc @@ -205,26 +205,14 @@ class group extends plugin $this->reload(); } - /* Only display bases that we are able to read/write */ + /* Get bases */ $ui = get_userinfo(); + $check = $ui->get_module_departments("groups"); $bases = array(); - if($this->dn == "new") { - foreach($this->config->idepartments as $dn => $name){ - $acl = $ui->get_permissions($dn,"groups/group") ; - if(preg_match("/c/",$acl)){ - $bases[$dn]=$name; - } - } - }else{ - foreach($this->config->idepartments as $dn => $name){ - $acl = $ui->get_category_permissions($dn,"groups") ; - if(preg_match("/w/",$acl)){ - $bases[$dn]=$name; - } - } + foreach($check as $dn_allowed){ + $bases[$dn_allowed] = $this->config->idepartments[$dn_allowed]; } - /* Base select dialog */ $once = true; foreach($_POST as $name => $value){ @@ -313,13 +301,14 @@ class group extends plugin $smarty->assign("launchimage", get_template_path('images/small_filter.png')); $smarty->assign("tree_image", get_template_path('images/tree.png')); - /* Generate list of bases */ - $check = $ui->get_module_departments("users"); - $bases_user_select = array(); + /* Get bases */ + $ui = get_userinfo(); + $check = $ui->get_module_departments("groups"); + $bases = array(); foreach($check as $dn_allowed){ - $bases_user_select[$dn_allowed] = $this->config->idepartments[$dn_allowed]; + $bases[$dn_allowed] = $this->config->idepartments[$dn_allowed]; } - + $smarty->assign("deplist", $bases_user_select); $smarty->assign("alphabet", generate_alphabet()); foreach( array("dselect", "regex","SubSearchGroup") as $type){ -- 2.30.2