Module: check_mk
Branch: master
Commit: c6e58f15317f7c059475b399f07b49eb5a2f8b9e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c6e58f15317f7c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 3 16:39:01 2016 +0100
#3047 FIX Git integration: Using the users mail address for commit messages
---
.werks/3047 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/config.py | 7 +++++--
web/htdocs/watolib.py | 2 +-
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/.werks/3047 b/.werks/3047
new file mode 100644
index 0000000..a6cc157
--- /dev/null
+++ b/.werks/3047
@@ -0,0 +1,9 @@
+Title: Git integration: Using the users mail address for commit messages
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.7i4
+Date: 1454513900
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 3be380c..b8140b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -356,6 +356,7 @@
* 3036 FIX: Bulk discovery steps are now timing out short before HTTP request
timeout...
* 3038 FIX: Fixed invalid error message when creating service group assignment rule
without having service groups
* 3044 FIX: Fixed garbled notifications page on page reload after an action has been
performed
+ * 3047 FIX: Git integration: Using the users mail address for commit messages
* 3169 FIX: Permission/Contact group settings for new hosts did show folder
options...
Notifications:
diff --git a/web/htdocs/config.py b/web/htdocs/config.py
index ca653a4..e461e80 100644
--- a/web/htdocs/config.py
+++ b/web/htdocs/config.py
@@ -251,13 +251,15 @@ def login(u):
user_baserole_id = "guest"
# Prepare user object
- global user, user_alias
+ global user, user_alias, user_email
if u in multisite_users:
user = multisite_users[u]
user_alias = user.get("alias", user_id)
+ user_email = user.get("email", user_id)
else:
user = { "roles" : user_role_ids }
user_alias = user_id
+ user_email = user_email
# Prepare cache of already computed permissions
global user_permissions
@@ -292,9 +294,10 @@ def login_super_user():
user_baserole_id = "admin"
# Prepare user object
- global user, user_alias
+ global user, user_alias, user_email
user = { "roles" : "admin" }
user_alias = "Superuser for unauthenticated pages"
+ user_email = "admin"
# Prepare cache of already computed permissions
global user_permissions
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index ab04240..cca476c 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -4250,7 +4250,7 @@ def shell_quote(s):
def do_git_commit():
- author = shell_quote("%s <%s>" % (config.user_id,
config.user_alias))
+ author = shell_quote("%s <%s>" % (config.user_id,
config.user_email))
git_dir = defaults.default_config_dir + "/.git"
if not os.path.exists(git_dir):
git_command(["init"])