[checkmk-commits] Check_MK Git: check_mk: FIX: fixed detection of existing groups when creating new groups

git version control git at mathias-kettner.de
Sun Nov 18 14:34:54 CET 2012


Module: check_mk
Branch: master
Commit: de6087820df09f3a6812c0be26205b05f727bed7
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=de6087820df09f3a6812c0be26205b05f727bed7

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Sun Nov 18 14:30:40 2012 +0100

FIX: fixed detection of existing groups when creating new groups

Conflicts:

	ChangeLog

---

 ChangeLog          |    7 +++++++
 web/htdocs/wato.py |    2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7b432e9..88d1d14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -120,6 +120,13 @@
     * winperf_phydisk: monitor average queue length for read/write
 
 1.2.0p4:
+    WATO:
+    * FIX: fixed detection of existing groups when creating new groups
+
+
+1.2.0p3:
+    Mulitisite
+    * Added "view" parameter to dashlet_pnpgraph webservice
     * FIX: BI: Assuming "OK" for hosts is now possible
     * FIX: Fixed error in makeuri() calls when no parameters in URL
     * FIX: Try out mode in view editor does not show context buttons anymore
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a0135f7..b8604bc 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -5807,6 +5807,8 @@ def mode_edit_group(phase, what):
                     raise MKUserError("name", _("Sorry, spaces are not allowed in group names."))
                 if not re.match("^[-a-z0-9A-Z_]*$", name):
                     raise MKUserError("name", _("Invalid group name. Only the characters a-z, A-Z, 0-9, _ and - are allowed."))
+                if name in groups:
+                    raise MKUserError("name", _("Sorry, there is already a group with that name"))
                 groups[name] = alias
                 log_pending(SYNCRESTART, None, "edit-%sgroups" % what, _("Create new %s group %s" % (what, name)))
             else:



More information about the checkmk-commits mailing list