summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f4ff605)
raw | patch | inline | side by side (parent: f4ff605)
author | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 26 Jun 2009 10:49:06 +0000 (10:49 +0000) | ||
committer | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 26 Jun 2009 10:49:06 +0000 (10:49 +0000) |
When adding new groups or editting existing groups
check for existing groups and abort with an error if same
named groups exist in the same unit tag
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13801 594d385d-05f5-0310-b6e9-bd551577e9d8
check for existing groups and abort with an error if same
named groups exist in the same unit tag
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13801 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/trunk/gosa-core/locale/core/de/LC_MESSAGES/messages.po b/trunk/gosa-core/locale/core/de/LC_MESSAGES/messages.po
index 78ad7769df6e8ef9423ef5b7bb6a2cba08c0b433..b235d85d1df1969ebf1a6a762ac37bb6a47d94b2 100644 (file)
"Authentisierungscache um eine automatische Wiederanmeldung des Browsers zu "
"verhindern."
+#: plugins/admin/groups/class_groupGeneric.inc:
+msgid "Another group of the same name already exists, saving or creating this group is not allowed. Please rename the group or remove the other group."
+msgstr "Es existiert bereits eine gleichnamige Gruppe, daher ist das Erstellen oder Speichern dieser Gruppe nicht erlaubt. Bitte benennen Sie die Gruppe um oder entfernen Sie die andere Gruppe."
diff --git a/trunk/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/trunk/gosa-core/plugins/admin/groups/class_groupGeneric.inc
index 9740e80ec12c682eb8194464a3d623bbe704cfa3..4f9cf07670643fd7b5f8c92264931962f56be76d 100644 (file)
$this->groupType= 0;
}
$this->oldgroupType= $this->groupType;
+
}
/* Get global filter config */
$message[]= msgPool::duplicated(_("Name"));
}
}
-
}else{
-
- /* Check for used 'cn' */
- $ldap= $this->config->get_ldap_link();
- $ldap->cd($this->config->current['BASE']);
- $ldap->search("(&(|(objectClass=gosaGroupOfNames)(objectClass=posixGroup))(cn=$this->cn))",array("cn"));
- if ($ldap->count() != 0){
-
- /* New entry? */
- if ($this->dn == 'new'){
- $message[]= msgPool::duplicated(_("Name"));
- }
-
- /* Moved? */
- elseif ($new_dn != $this->orig_dn){
- $ldap->fetch();
- if ($ldap->getDN() != $this->orig_dn){
- $message[]= msgPool::duplicated(_("Name"));
+ /* Check for used 'cn' */
+ $ldap= $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(|(objectClass=gosaGroupOfNames)(objectClass=posixGroup))(cn=$this->cn))",array("cn", "gosaUnitTag"));
+ if ($ldap->count() != 0){
+ while ($entry = $ldap->fetch()) {
+ if ($this->gosaUnitTag == '' || ($this->orig_dn != $new_dn)) {
+ $tag = $this->get_gosaUnitTag($new_dn);
+ }
+ else {
+ $tag = $this->gosaUnitTag;
+ }
+ if ($entry['gosaUnitTag'][0] == $tag) {
+ if ($ldap->getDN() != $this->orig_dn){
+ $message[]= _("Another group of the same name already exists, saving or creating this group is not allowed. Please rename the group or remove the other group.");
+ break;
+ }
+ }
}
}
- }
- }
-
+ }
+
/* Check ID */
if ($this->force_gid == "1"){
if (!tests::is_id($this->gidNumber)){
diff --git a/trunk/gosa-core/plugins/admin/groups/class_groupManagement.inc b/trunk/gosa-core/plugins/admin/groups/class_groupManagement.inc
index 81c8bb8f9b826cd101051c553b9ca7dbbc23acdb..c2ea563e850a1845d0e9ebe9996752be18a80ff4 100644 (file)
$this->ShowPrimaryCheckBox = true;
}
+ echo "<pre>" . var_dump($this) . "</pre><br>";
/* Create dialog object */
$this->DivListGroup = new divListGroup($this->config,$this);
$this->DivListGroup->DisableCheckBox("ShowPrimaryGroups",$this->ShowPrimaryCheckBox);