Module: check_mk
Branch: master
Commit: ff13548ef4f4462feecb7e3b83c3c106a8cf68f0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ff13548ef4f446…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 22 14:53:00 2013 +0100
FIX Context help toggled on/off randomly
During browsing different multisite pages, it could happen
that the help switched on/off randomly.
The setting was loaded before having the correct user
context loaded. Now setting that option after the user has
been logged in.
---
.werks/284 | 13 +++++++++++++
ChangeLog | 1 +
web/htdocs/html_mod_python.py | 2 ++
web/htdocs/index.py | 1 +
4 files changed, 17 insertions(+)
diff --git a/.werks/284 b/.werks/284
new file mode 100644
index 0000000..0a92370
--- /dev/null
+++ b/.werks/284
@@ -0,0 +1,13 @@
+Title: Context help toggled on/off randomly
+Level: 1
+Component: multisite
+Version: 1.2.3i7
+Date: 1385127740
+Class: fix
+
+During browsing different multisite pages, it could happen
+that the help switched on/off randomly.
+
+The setting was loaded before having the correct user
+context loaded. Now setting that option after the user has
+been logged in.
diff --git a/ChangeLog b/ChangeLog
index 81fc4eb..e952bc2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -44,6 +44,7 @@
* 0210 FIX: LDAP: Fixed problem syncing contactgroups of a user with umlauts in CN
* 0035 FIX: http[s] links are display again in the plugin output...
* 0006 FIX: Checkboxes for hosts/services were missing on modified views...
+ * 0284 FIX: Context help toggled on/off randomly...
WATO:
* 0053 New rule for configuring the display_name of a service...
diff --git a/web/htdocs/html_mod_python.py b/web/htdocs/html_mod_python.py
index 401b9bc..e104bb3 100644
--- a/web/htdocs/html_mod_python.py
+++ b/web/htdocs/html_mod_python.py
@@ -17,6 +17,8 @@ class html_mod_python(htmllib.html):
self.user = req.user
self.read_get_vars()
self.read_cookies()
+
+ def load_help_visible(self):
try:
self.help_visible = config.load_user_file("help", False) # cache
for later usage
except:
diff --git a/web/htdocs/index.py b/web/htdocs/index.py
index 162d62f..7c080a8 100644
--- a/web/htdocs/index.py
+++ b/web/htdocs/index.py
@@ -300,6 +300,7 @@ def handler(req, profiling = True):
# Set all permissions, read site config, and similar stuff
config.login(html.user)
+ html.load_help_visible()
# Initialize the multiste i18n. This will be replaced by
# language settings stored in the user profile after the user