Module: check_mk
Branch: master
Commit: 1ebe1c830219ab8333cee135e3546633ef0f1cf0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1ebe1c830219ab…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 24 13:55:16 2017 +0200
Site editing now validates that site IDs match when connecting with "local
site"
Change-Id: I2928587dc2b1d5c81128289b967a274dbd613ede
---
web/htdocs/wato.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 5045f41..dcbc7e8 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9685,9 +9685,15 @@ class ModeEditSite(ModeSites):
self._new_site["socket"] = "tcp:%s:%d" % method[1]
elif method:
self._new_site["socket"] = method
+
elif "socket" in self._new_site:
del self._new_site["socket"]
+ if method == None and self._site_id != config.omd_site():
+ raise MKUserError("method_sel", _("You can only configure a
local site connection for "
+ "the local site. The site IDs
('%s' and '%s') are "
+ "not equal.") % (self._site_id,
config.omd_site()))
+
# Timeout
if self._timeout != "":
try: