Module: check_mk
Branch: master
Commit: 2e002a4e6bafffdb4391ba06e8c762e144b12dc2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2e002a4e6bafff…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 2 10:32:57 2015 +0100
#2781 FIX Fix role handling of "Custom Links" snapin in case of adapted roles
If you have defined you own roles then a user had not correctly been mapped
to <tt>user</tt>, <tt>guest</tt> or <tt>admin</tt>
when selecting the right
portions of the custom links in the snapin. This has been fixed. Thanks to
Molchanov Alexander.
---
.werks/2781 | 13 +++++++++++++
ChangeLog | 1 +
web/htdocs/config.py | 4 ++--
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/2781 b/.werks/2781
new file mode 100644
index 0000000..190d137
--- /dev/null
+++ b/.werks/2781
@@ -0,0 +1,13 @@
+Title: Fix role handling of "Custom Links" snapin in case of adapted roles
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1449048678
+
+If you have defined you own roles then a user had not correctly been mapped
+to <tt>user</tt>, <tt>guest</tt> or <tt>admin</tt>
when selecting the right
+portions of the custom links in the snapin. This has been fixed. Thanks to
+Molchanov Alexander.
diff --git a/ChangeLog b/ChangeLog
index 8e1cba7..161e4c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -139,6 +139,7 @@
* 2772 FIX: Fixed possible exception in icon column when showing some actions in the
column...
* 2846 FIX: View refresh could reset checkboxes on views where "always show
checkboxes" is enabled
* 2778 FIX: Fixed correct scaling of sidebar on newer versions of Chrome browser
+ * 2781 FIX: Fix role handling of "Custom Links" snapin in case of adapted
roles...
WATO:
* 2442 WATO remove host: improved cleanup of obsolete host files...
diff --git a/web/htdocs/config.py b/web/htdocs/config.py
index 3a399d1..030b2fd 100644
--- a/web/htdocs/config.py
+++ b/web/htdocs/config.py
@@ -243,9 +243,9 @@ def login(u):
# Get best base roles and use as "the" role of the user
global user_baserole_id
- if "admin" in user_role_ids:
+ if "admin" in user_baserole_ids:
user_baserole_id = "admin"
- elif "user" in user_role_ids:
+ elif "user" in user_baserole_ids:
user_baserole_id = "user"
else:
user_baserole_id = "guest"