summaryrefslogtreecommitdiffstats
path: root/wallace
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 /wallace
parent1e6d596fd0c9931a40a054c7294073a4c33a08de (diff)
downloadpykolab-e94e4e2aac08b92326c1e659d8e3466aa76534a9.tar.gz
Consider kolabDelegate status when searching for events to be updated on iTip replies (#4261)
Diffstat (limited to 'wallace')
-rw-r--r--wallace/module_invitationpolicy.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/wallace/module_invitationpolicy.py b/wallace/module_invitationpolicy.py
index 6ffc5e5..1e94f63 100644
--- a/wallace/module_invitationpolicy.py
+++ b/wallace/module_invitationpolicy.py
@@ -281,6 +281,12 @@ def execute(*args, **kw):
receiving_user = auth.get_entry_attributes(None, recipient_user_dn, ['*'])
recipient_emails = auth.extract_recipient_addresses(receiving_user)
recipient_email = recipient
+
+ # extend with addresses from delegators
+ receiving_user['_delegated_mailboxes'] = []
+ for _delegator in auth.list_delegators(recipient_user_dn):
+ receiving_user['_delegated_mailboxes'].append(_delegator['_mailbox_basename'].split('@')[0])
+
log.debug(_("Recipient emails for %s: %r") % (recipient_user_dn, recipient_emails), level=8)
break
@@ -729,9 +735,11 @@ def list_user_folders(user_rec, type):
for folder in folders:
# exclude shared and other user's namespace
- # TODO: list shared folders the user has write privileges ?
if not ns_other is None and folder.startswith(ns_other):
- continue;
+ # allow shared folders from delegators
+ if len([_mailbox for _mailbox in user_rec['_delegated_mailboxes'] if folder.startswith(ns_other + _mailbox + '/')]) == 0:
+ continue;
+ # TODO: list shared folders the user has write privileges ?
if not ns_shared is None and len([_ns for _ns in ns_shared if folder.startswith(_ns)]) > 0:
continue;