Module: check_mk
Branch: master
Commit: 9356889969d7fdd0799e070c053cebdd8a389f72
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9356889969d7fd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 16 09:32:58 2012 +0200
WATO: Added wato_create_users_from_htpasswd option
Users & Contacts: Added new option wato_create_users_from_htpasswd
to make handling of users only appearing in htpasswd configurable. The
default is set to True to keep the default behaviour. Users only appearing
in htpasswd will not be shown in this GUI when the option is set to
False.
---
ChangeLog | 4 ++++
web/htdocs/config.py | 1 +
web/htdocs/wato.py | 2 +-
3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0ea1d0c..735d39b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,10 @@
* Added new variable logwatch_rules which can also be managed through the
WATO ruleset editor (Host/Service Parameters > Parameters and rules for
inventorized checks > Various applications > Logwatch Patterns)
+ * Users & Contacts: Added new option wato_create_users_from_htpasswd to make
+ handling of users only appearing in htpasswd configurable. The default
+ is set to True to keep the default behaviour. Users only appearing in
+ htpasswd will not be shown in this GUI when the option is set to False.
Multisite
* Added config option default_ts_format to configure default timestamp
diff --git a/web/htdocs/config.py b/web/htdocs/config.py
index 4d161cb..04df063 100644
--- a/web/htdocs/config.py
+++ b/web/htdocs/config.py
@@ -621,6 +621,7 @@ wato_num_hostspecs = 12
wato_num_itemspecs = 15
wato_activation_method = 'restart'
wato_write_nagvis_auth = False
+wato_create_users_from_htpasswd = True
# ____ ___
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 1b3a234..6c7a67d 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7207,7 +7207,7 @@ def load_users():
if id in result:
result[id]["password"] = password
result[id]["locked"] = locked
- else:
+ elif wato_create_users_from_htpasswd:
# Create entry if this is an admin user
new_user = {
"roles" : config.roles_of_user(id),