Code

fixed base selection
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 6 Sep 2006 04:23:12 +0000 (04:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 6 Sep 2006 04:23:12 +0000 (04:23 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4598 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_groupGeneric.inc

index 5d4e37da129e058980372e21c0d560230e994f86..b57e4c1d25ec688e4c5692ce57774ba1c8b5737f 100644 (file)
@@ -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){