From 558da5c81553bc8e1c3ccf9831a760388d06cad3 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 8 Dec 2021 18:19:37 +0100 Subject: [PATCH] ldap.LdapClient: add update_need method --- mylib/ldap.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mylib/ldap.py b/mylib/ldap.py index 7cd522b..d5e3b8b 100644 --- a/mylib/ldap.py +++ b/mylib/ldap.py @@ -670,6 +670,18 @@ class LdapClient: ignore_attrs=protected_attrs, prefix=prefix ) + def update_need(self, changes, protected_attrs=None): + """ + Check if update is need + + :param changes: The changes as returned by get_changes + """ + assert self._conn or self.initialize() + return self._conn.update_need( + changes[0], changes[1], + ignore_attrs=protected_attrs + ) + def add_object(self, dn, attrs): """ Add an object