Module: check_mk
Branch: master
Commit: 09fdb7ab46a8cef619097dcec2f0efa847b3eb33
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=09fdb7ab46a8ce…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jul 22 16:42:57 2013 +0200
FIX: automation users can now be deleted again (bug was introduced in 1.2.2p1)
---
ChangeLog | 1 +
web/htdocs/userdb.py | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index b168a8d..3232296 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -273,6 +273,7 @@
* FIX: fix layout of Auxiliary tags table
* FIX: avoid exception when called first time and first page ist host tags
* FIX: fix validation of time-of-day input field (24:00)
+ * FIX: automation users can now be deleted again (bug was introduced in 1.2.2p1)
1.2.2p2:
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index 73d7c90..1b60826 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -394,6 +394,14 @@ def save_users(profiles):
# entry = dir + "/" + e
# if os.path.isdir(entry):
# shutil.rmtree(entry)
+ # But for the automation.secret this is ok, since automation users are not
+ # created by other sources in common cases
+ dir = defaults.var_dir + "/web"
+ for user_dir in os.listdir(defaults.var_dir + "/web"):
+ if user_dir not in ['.', '..'] and user_dir not in profiles:
+ entry = dir + "/" + user_dir
+ if os.path.isdir(entry) and os.path.exists(entry +
'/automation.secret'):
+ os.unlink(entry + '/automation.secret')
# Release the lock to make other threads access possible again asap
# This lock is set by load_users() only in the case something is expected