Module: check_mk
Branch: master
Commit: ea56f70d26b73e2337e06aec4e66004d657990c2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ea56f70d26b73e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Aug 1 10:58:05 2016 +0200
Adding pending changes when editing passwords
---
web/htdocs/wato.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index feb30a3..ff32bd1 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -15266,6 +15266,8 @@ class ModePasswords(WatoMode, PasswordStore):
if ident not in passwords:
raise MKUserError("ident", _("This password does not
exist."))
+ log_pending(SYNCRESTART, ident, "delete-password",
+ _("Removed the password '%s'") % ident)
del passwords[ident]
self._save(passwords)
@@ -15449,6 +15451,13 @@ class ModeEditPassword(WatoMode, PasswordStore):
passwords[self._ident] = self._cfg
+ if self._new:
+ log_pending(SYNCRESTART, self._ident, "add-host",
+ _("Added the password '%s'") %
self._ident)
+ else:
+ log_pending(SYNCRESTART, self._ident, "edit-password",
+ _("Edited the password '%s'") %
self._ident)
+
self._save(passwords)
return "passwords"