Branch 'pykolab-0.5' - pykolab/auth
Jeroen van Meeuwen
vanmeeuwen at kolabsys.com
Wed May 22 13:51:23 CEST 2013
pykolab/auth/ldap/__init__.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 38023876abbdb0dcea25d56c8e3e6277ec13f80a
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Wed May 22 13:50:41 2013 +0200
Only obtain the value of the cache_entry if the entry supplied in the callback does not already have a result attribute value
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 118a6d8..b1b01bb 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1773,11 +1773,12 @@ class LDAP(pykolab.base.Base):
# See if we can find the cache entry - this way we can get to
# the value of a (former, on a deleted entry) result_attribute
- cache_entry = cache.get_entry(self.domain, entry, update=False)
result_attribute = conf.get('cyrus-sasl', 'result_attribute')
+ if not entry.has_key(result_attribute):
+ cache_entry = cache.get_entry(self.domain, entry, update=False)
- if hasattr(cache_entry, 'result_attribute') and change == 'delete':
- entry[result_attribute] = cache_entry.result_attribute
+ if hasattr(cache_entry, 'result_attribute') and change == 'delete':
+ entry[result_attribute] = cache_entry.result_attribute
eval(
"self._change_%s_%s(entry, change_dict)" % (
More information about the commits
mailing list