summaryrefslogtreecommitdiffstats
path: root/pykolab/auth/ldap/__init__.py
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-02 17:52:19 +0100
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-02 17:52:19 +0100
commite94e4e2aac08b92326c1e659d8e3466aa76534a9 (patch)
tree65a7ccfa14588df961ea7151d6b5e86ee716851d /pykolab/auth/ldap/__init__.py
parent1e6d596fd0c9931a40a054c7294073a4c33a08de (diff)
downloadpykolab-e94e4e2aac08b92326c1e659d8e3466aa76534a9.tar.gz
Consider kolabDelegate status when searching for events to be updated on iTip replies (#4261)
Diffstat (limited to 'pykolab/auth/ldap/__init__.py')
-rw-r--r--pykolab/auth/ldap/__init__.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 615a3b4..dd477ef 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -429,6 +429,25 @@ class LDAP(pykolab.base.Base):
return recipient_addresses
+ def list_delegators(self, entry_id):
+ """
+ Get a list of user records the given user is set to be a delegatee
+ """
+ delegators = []
+
+ mailbox_attribute = conf.get('cyrus-sasl', 'result_attribute')
+ if mailbox_attribute == None:
+ mailbox_attribute = 'mail'
+
+ for __delegator in self.search_entry_by_attribute('kolabDelegate', entry_id):
+ (_dn, _delegator) = __delegator
+ _delegator['dn'] = _dn;
+ _delegator['_mailbox_basename'] = _delegator[mailbox_attribute] if _delegator.has_key(mailbox_attribute) else None
+ if isinstance(_delegator['_mailbox_basename'], list):
+ _delegator['_mailbox_basename'] = _delegator['_mailbox_basename'][0]
+ delegators.append(_delegator)
+
+ return delegators
def find_recipient(self, address="*", exclude_entry_id=None):
"""