summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cd0bf18)
raw | patch | inline | side by side (parent: cd0bf18)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 25 Feb 2009 15:50:57 +0000 (15:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 25 Feb 2009 15:50:57 +0000 (15:50 +0000) |
-Added information message if gidNumber is used more than once.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13458 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13458 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/groups/class_groupGeneric.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/gosa-core/plugins/admin/groups/class_groupGeneric.inc
index 1d09413402dbc0832d3738cd59009ab7de3d766a..a5426f94d779d51c0f4c66336e036d4fb1c7e5e2 100644 (file)
$ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
}
+
+ /* Check generated gidNumber, it may be used by another group.
+ */
+ if($this->gidNumber != ""){
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(!(cn=".$this->orig_cn."))(objectClass=posixGroup)(gidNumber=".$this->gidNumber."))",array("cn"));
+ if($ldap->count()){
+ $cns = "";
+ while($attrs = $ldap->fetch()){
+ $cns .= $attrs['cn'][0].", ";
+ }
+ $cns = rtrim($cns,", ");
+ msg_dialog::display(_("Warning"),sprintf(_("The gidNumber (%s) used or generated for this group is not uniq! It is already used in the following groups: '%s'."),$this->gidNumber,$cns) , WARNING_DIALOG );
+ }
+ }
+
/* Write back to ldap */
$ldap->cd($this->dn);
$this->cleanup();