From e7e2cdc50b1161a6c0a1b1d281d43c88ae0df7ee Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 5 Dec 2005 07:24:27 +0000 Subject: [PATCH] Fixed filter and added check for existing dn git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2231 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/ogroups/class_ogroup.inc | 10 ++++++++++ plugins/admin/ogroups/class_ogroupManagement.inc | 1 + 2 files changed, 11 insertions(+) diff --git a/plugins/admin/ogroups/class_ogroup.inc b/plugins/admin/ogroups/class_ogroup.inc index b32c91fcf..3b7751fc7 100644 --- a/plugins/admin/ogroups/class_ogroup.inc +++ b/plugins/admin/ogroups/class_ogroup.inc @@ -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); diff --git a/plugins/admin/ogroups/class_ogroupManagement.inc b/plugins/admin/ogroups/class_ogroupManagement.inc index 09210ac1e..577bd1742 100644 --- a/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/plugins/admin/ogroups/class_ogroupManagement.inc @@ -563,6 +563,7 @@ name='dep_root' alt='"._("Root")."'> ". if ($ogroupfilter['fongroups'] == "checked"){ $filter.= "(gosaGroupObjects=*F*)"; } + $filter.= "(gosaGroupObjects=[])"; if ($filter != ""){ $filter= "(&(cn=$regex)(objectClass=gosaGroupOfNames)(|$filter))"; -- 2.30.2