Module: check_mk
Branch: master
Commit: bcd22c8272abc911dbc3e2023518c421ea649967
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bcd22c8272abc9…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun May 6 18:52:26 2012 +0200
FIX: better error message if not logged into site during remote automation
---
ChangeLog | 5 ++++-
web/htdocs/wato.py | 4 ++++
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1d329f9..974a60e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,11 @@
1.2.0b4:
WATO:
* ps and ps.perf configurable via WATO now (without inventory)
- * FIX: honor folder-permissions when creating, deleting and modifiying rules
+ * FIX: honor folder-permissions when creating, deleting
+ and modifiying rules
* FIX: detect non-local site even if unix: is being used
+ * FIX: better error message if not logged into site during
+ action that needs remote access
Multisite:
* FIX: fixed filter of recent event views (4 hours didn't catch)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 01923e8..5bbec4e 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6675,6 +6675,10 @@ def get_url(url, insecure, user=None, password=None, params =
''):
return response_body
def check_mk_remote_automation(siteid, command, args, indata):
+ site = config.site(siteid)
+ if "secret" not in site:
+ raise MKGeneralException(_("Cannot access site %s - you are not logged
in.")
+ % site.get("alias", siteid))
# If the site is not up-to-date, synchronize it first.
repstatus = load_replication_status()
if repstatus.get(siteid, {}).get("need_sync"):