Code

First layout adaptions
[gosa.git] / plugins / admin / ogroups / class_ogroup.inc
index f7312d2345017003c6d3040f9a38aabc876dc79a..3b7751fc7fe420296b99b1d888344967c9a9a654 100644 (file)
@@ -83,6 +83,12 @@ class ogroup extends plugin
      $this->base = $_SESSION['ogroupfilter']['depselect'];
     }
 
+     /* set permissions */
+    $ui= get_userinfo();
+    $acl= get_permissions ($ui->dn, $ui->subtreeACL);
+    $this->acl= get_module_permission($acl, "ogroup", $ui->dn);
+
+
     /* Load member data */
     $this->reload();
   }
@@ -115,7 +121,9 @@ class ogroup extends plugin
 
   function execute()
   {
-    
+       /* Call parent execute */
+       plugin::execute();
+
     $this->reload();
 
     /* Do we represent a valid group? */
@@ -516,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);