summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2019-11-18 11:18:51 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2019-11-18 11:18:51 +0100
commitd7eac445c12ba252839bc5789dd1b457b1a31015 (patch)
treeffd70862e2c34287186adc1f31b74bc757e5fae5
parentef85ddea076263eb774c1e91a38cdb87a4ba9792 (diff)
downloadpykolab-d7eac445c12ba252839bc5789dd1b457b1a31015.tar.gz
Ignore changes to objects with an nstombstone objectclass (Bifrost #T252995)
-rw-r--r--pykolab/auth/ldap/__init__.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index d114789..c5643d9 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -2687,6 +2687,12 @@ class LDAP(Base):
}
entry = utils.normalize(kw['entry'])
+
+ # Ignore nstombstone objects
+ if 'objectclass' in entry:
+ if 'nstombstone' in entry['objectclass']:
+ return None
+
entry['dn'] = kw['dn']
unique_attr = self.config_get('unique_attribute')
@@ -2739,6 +2745,11 @@ class LDAP(Base):
for attr in entry_attrs.keys():
entry[attr.lower()] = entry_attrs[attr]
+ # Ignore nstombstone objects
+ if 'objectclass' in entry:
+ if 'nstombstone' in entry['objectclass']:
+ return None
+
unique_attr = self.config_get('unique_attribute').lower()
entry['id'] = entry[unique_attr]