Code

Fixed filter and added check for existing dn
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 Dec 2005 07:24:27 +0000 (07:24 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 Dec 2005 07:24:27 +0000 (07:24 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2231 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/ogroups/class_ogroup.inc
plugins/admin/ogroups/class_ogroupManagement.inc

index b32c91fcf419d4b4e1d8ef96ae65542912b19c0c..3b7751fc7fe420296b99b1d888344967c9a9a654 100644 (file)
@@ -524,6 +524,16 @@ class ogroup extends plugin
       $new_dn= $this->dn;
     }
 
+
+    $ldap = $this->config->get_ldap_link();
+    if($this->dn != $new_dn){
+      $ldap->cat ($new_dn);
+    }
+    
+    if($ldap->count() !=0){
+      $message[]= _("There is already an object with this cn.");
+    } 
+
     $ui= get_userinfo();
     $acl= get_permissions ($new_dn, $ui->subtreeACL);
     $acl= get_module_permission($acl, "group", $new_dn);
index 09210ac1e3f2b33e72f04c1ec258137feb340a07..577bd17423ccc974d0c93470d68ad443f497ce24 100644 (file)
@@ -563,6 +563,7 @@ name='dep_root' alt='"._("Root")."'>&nbsp;".
     if ($ogroupfilter['fongroups'] == "checked"){
       $filter.= "(gosaGroupObjects=*F*)";
     }
+    $filter.= "(gosaGroupObjects=[])";
 
     if ($filter != ""){
       $filter= "(&(cn=$regex)(objectClass=gosaGroupOfNames)(|$filter))";