Module: check_mk
Branch: master
Commit: cf4abd145134028e3f88c5ab1f99658be3911502
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cf4abd14513402…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 20 10:36:59 2015 +0100
#2008 FIX Users created during basic auth login get the role assigned configured in
"default user profile"
Previously the role(s) configured in the default user profile were not used
when a user which is not known to multisite logs in via basic auth.
---
.werks/2008 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/config.py | 2 ++
3 files changed, 14 insertions(+)
diff --git a/.werks/2008 b/.werks/2008
new file mode 100644
index 0000000..627573d
--- /dev/null
+++ b/.werks/2008
@@ -0,0 +1,11 @@
+Title: Users created during basic auth login get the role assigned configured in
"default user profile"
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1424424942
+
+Previously the role(s) configured in the default user profile were not used
+when a user which is not known to multisite logs in via basic auth.
diff --git a/ChangeLog b/ChangeLog
index d608b8a..e3bcc7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -212,6 +212,7 @@
* 1984 FIX: Fixed loosing sidebar after switching to/from edit mode in dashboard
edior on page reload...
* 1985 FIX: PNP graph dashlet handles graphs in distributed setups correctly...
* 1945 FIX: doc/treasures/downtime script: was no longer working because of latest
changes in the GUI...
+ * 2008 FIX: Users created during basic auth login get the role assigned configured in
"default user profile"...
WATO:
* 1760 Added search form to manual checks page
diff --git a/web/htdocs/config.py b/web/htdocs/config.py
index a07f4bb..db05b82 100644
--- a/web/htdocs/config.py
+++ b/web/htdocs/config.py
@@ -298,6 +298,8 @@ def roles_of_user(user):
return [ "user" ]
elif os.path.exists(config_dir + "/" + user +
"/automation.secret"):
return [ "guest" ] # unknown user with automation account
+ elif 'roles' in default_user_profile:
+ return default_user_profile['roles']
elif default_user_role:
return [ default_user_role ]
else: