Module: check_mk
Branch: master
Commit: 818d011f421239a43179de21f08772f31f040208
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=818d011f421239…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Sep 28 21:44:18 2016 +0200
3738 FIX Fixed sporadic pending changes due to (not) changed contact groups
The LDAP connector sometimes creates pending changes because of changed
contact groups. But the groups have not really changed. Just the order
of the groups in the answer from the LDAP server has changed. This
has been fixed.
---
.werks/3738 | 13 +++++++++++++
ChangeLog | 1 +
web/plugins/userdb/ldap.py | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/3738 b/.werks/3738
new file mode 100644
index 0000000..ca53508
--- /dev/null
+++ b/.werks/3738
@@ -0,0 +1,13 @@
+Title: Fixed sporadic pending changes due to (not) changed contact groups
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i1
+Date: 1475091791
+
+The LDAP connector sometimes creates pending changes because of changed
+contact groups. But the groups have not really changed. Just the order
+of the groups in the answer from the LDAP server has changed. This
+has been fixed.
diff --git a/ChangeLog b/ChangeLog
index b1ac70e..e41c28c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -645,6 +645,7 @@
* 3844 FIX: Fixed validation of host IPv4, IPv6 and management host address
attributes...
* 3845 FIX: Added missing validation of host attribute values to WATO Web API calls
* 3881 FIX: fixed automation call 'delete piggyback host'
+ * 3738 FIX: Fixed sporadic pending changes due to (not) changed contact groups...
Notifications:
* 3263 Notifications: allow users to restrict by their contact groups...
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 84a78ba..da505a1 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -1308,7 +1308,7 @@ def get_groups_of_user(connection, user_id, ldap_user, cg_names,
nested, other_c
if user_cmp_val in group['members']:
group_cns.append(group['cn'])
- return group_cns
+ return sorted(group_cns)
group_membership_parameters = [