LdapServer : add update_need() helper method

This commit is contained in:
Benjamin Renard 2019-04-19 09:55:14 +02:00 committed by root
parent 9d42fa6c71
commit 0a127f0f8b

View file

@ -95,6 +95,12 @@ class LdapServer(object):
self._error("LdapServer - Error updating %s : %s\nOld : %s\nNew : %s" % (dn, e, old, new), logging.error)
return False
def update_need(self, old, new, ignore_attrs=[]):
ldif = modlist.modifyModlist(old, new, ignore_attr_types=ignore_attrs)
if ldif == []:
return False
return True
def rename_object(self,dn,new_rdn):
try:
self.logger.debug("LdapServer - Rename %s in %s" % (dn,new_rdn))