Module: check_mk
Branch: master
Commit: 21a10e9b8f059a60cec4997247843c5f223b2233
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=21a10e9b8f059a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 27 09:30:21 2014 +0100
#1162 FIX User profiles can not be edited on WATO remote sites anymore
In previous versions it was possible for users to edit their own
user profile (language, password, ...) on WATO remote sites. This
was an problem, because it leads to inconsistent settings between
the master and remote site, because the changes on the remote site
are not synced to the master.
The edit dialog of the user profile has been removed/disabled for
all users of the remote site of a WATO distributed setup.
---
.werks/1162 | 16 ++++++++++++++++
ChangeLog | 3 ++-
web/htdocs/sidebar.py | 9 ++++++---
web/htdocs/wato.py | 3 +++
web/plugins/sidebar/wato.py | 2 +-
5 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/.werks/1162 b/.werks/1162
new file mode 100644
index 0000000..7f579c9
--- /dev/null
+++ b/.werks/1162
@@ -0,0 +1,16 @@
+Title: User profiles can not be edited on WATO remote sites anymore
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.5i6
+Date: 1414398442
+Class: fix
+
+In previous versions it was possible for users to edit their own
+user profile (language, password, ...) on WATO remote sites. This
+was an problem, because it leads to inconsistent settings between
+the master and remote site, because the changes on the remote site
+are not synced to the master.
+
+The edit dialog of the user profile has been removed/disabled for
+all users of the remote site of a WATO distributed setup.
diff --git a/ChangeLog b/ChangeLog
index cb3db73..5fa1a7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -74,10 +74,10 @@
* 1442 ups_socomec_out_source: New check for checking the power source of out phases
for Socomec UPSs
* 0662 domino_mailqueues: new check to monitor mail queues in Lotus Domino
* 1188 veeam_client: Check now also outputs ReadSize and TransferedSize...
- * 1190 statgrab_cpu: Check can now handle parameters
* 0663 domino_info: new check to extract informational data about a Lotus Domino
Server
* 0664 domino_users: new check to monitor the number of users on a Domino Notes
server
* 1447 domino_transactions: new check to monitor the number of transactions per
minute on Lotus Domino servers
+ * 1190 statgrab_cpu: Check can now handle parameters
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
@@ -139,6 +139,7 @@
* 1158 FIX: Moved filter logic to visuals module...
NOTE: Please refer to the migration notes!
* 1077 FIX: Fixed labelling of Y achsis in prediction graphs...
+ * 1162 FIX: User profiles can not be edited on WATO remote sites anymore...
WATO:
* 1096 New WATO web service: manage hosts via a new HTTP API...
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index 0607df6..129e806 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -182,9 +182,12 @@ def sidebar_foot():
if config.may("general.configure_sidebar"):
html.icon_button("sidebar_add_snapin.py", _("Add snapin to the
sidebar"), "sidebar_addsnapin",
target="main")
- if config.may("general.edit_profile") or
config.may("general.change_password"):
- html.icon_button("user_profile.py", _("Edit your personal
settings, change your password"), "sidebar_settings",
- target="main")
+ # editing the profile is not possible on remote sites which are sync targets
+ # of a central WATO system
+ if config.wato_enabled and \
+ (config.may("general.edit_profile") or
config.may("general.change_password")):
+ html.icon_button("user_profile.py", _("Edit your personal
settings, change your password"),
+ "sidebar_settings", target="main")
if config.may("general.logout") and not config.auth_by_http_header:
html.icon_button("logout.py", _("Log out"),
"sidebar_logout", target="_top")
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index bf89e58..b180543 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -15218,6 +15218,9 @@ def page_user_profile():
if not config.may('general.edit_profile') and not
config.may('general.change_password'):
raise MKAuthException(_("You are not allowed to edit your user
profile."))
+ if not config.wato_enabled:
+ raise MKAuthException(_('User profiles can not be edited (WATO is
disabled).'))
+
success = None
if html.has_var('_save') and html.check_transaction():
try:
diff --git a/web/plugins/sidebar/wato.py b/web/plugins/sidebar/wato.py
index 93a3589..56c7dca 100644
--- a/web/plugins/sidebar/wato.py
+++ b/web/plugins/sidebar/wato.py
@@ -36,7 +36,7 @@ import config, wato, views, dashboard
# +----------------------------------------------------------------------+
def render_wato(mini):
if not config.wato_enabled:
- html.write(_("WATO is disabled in
<tt>multisite.mk</tt>."))
+ html.write(_("WATO is disabled."))
return False
elif not config.may("wato.use"):
html.write(_("You are not allowed to use Check_MK's web configuration
GUI."))