Module: check_mk
Branch: master
Commit: 09d0efb16082b7b7fb2654693a6df54f72db8a95
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=09d0efb16082b7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 28 12:28:46 2016 +0100
4076 FIX Git integration: Using mail address of user in author info
---
.werks/4076 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/config.py | 16 +++++++++-------
3 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/.werks/4076 b/.werks/4076
new file mode 100644
index 0000000..35b7a38
--- /dev/null
+++ b/.werks/4076
@@ -0,0 +1,9 @@
+Title: Git integration: Using mail address of user in author info
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.4.0i3
+Date: 1480322901
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 4d2b296..8b0d8ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -58,6 +58,7 @@
* 4045 FIX: Tactical Overview: do not count OK events as problems
* 4068 FIX: Fixed possible exception in case of wrong automation secrets between
multiple sites...
* 3992 FIX: netapp_api_connection: fixed GUI display bug when editing rules
+ * 4076 FIX: Git integration: Using mail address of user in author info
Notifications:
* 4042 FIX: Fix missing From address in synchronous SMTP notifications...
diff --git a/web/htdocs/config.py b/web/htdocs/config.py
index 1ef46c1..1b051da 100644
--- a/web/htdocs/config.py
+++ b/web/htdocs/config.py
@@ -297,10 +297,10 @@ class LoggedInUser(object):
def __init__(self, user_id):
self.id = user_id
+ self._load_confdir()
self._load_roles()
self._load_attributes()
self._load_permissions()
- self._load_confdir()
self._load_site_config()
@@ -342,12 +342,14 @@ class LoggedInUser(object):
def _load_attributes(self):
- if self.id in multisite_users:
- self.attributes = multisite_users[self.id]
- else:
- self.attributes = {
- "roles" : self.role_ids,
- }
+ self.attributes = self.load_file("cached_profile", None)
+ if self.attributes == None:
+ if self.id in multisite_users:
+ self.attributes = multisite_users[self.id]
+ else:
+ self.attributes = {
+ "roles" : self.role_ids,
+ }
self.alias = self.attributes.get("alias", self.id)
self.email = self.attributes.get("email", self.id)