Code

First layout adaptions
[gosa.git] / plugins / admin / ogroups / class_ogroup.inc
index a88fd660a06c2e67f182f22ba12f78e2bec2daa3..3b7751fc7fe420296b99b1d888344967c9a9a654 100644 (file)
@@ -124,8 +124,6 @@ class ogroup extends plugin
        /* Call parent execute */
        plugin::execute();
 
-    print $this->acl;
-    
     $this->reload();
 
     /* Do we represent a valid group? */
@@ -526,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);