summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-24 19:49:22 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-24 19:49:22 (GMT)
commit70eef55a67dd05a0648e0a969c10400903e19d2a (patch)
tree2f99af4d65f1eb5a2b7c210e599f1497be5c6a72
parent9389961a04bc77a9ec9b82a3359e7fc7bba06016 (diff)
downloadpykolab-70eef55a67dd05a0648e0a969c10400903e19d2a.tar.gz
Select folder annotated as 'private' for storing events flagged as such (#4788)
-rw-r--r--wallace/module_invitationpolicy.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/wallace/module_invitationpolicy.py b/wallace/module_invitationpolicy.py
index 3c5c381..ca7aba5 100644
--- a/wallace/module_invitationpolicy.py
+++ b/wallace/module_invitationpolicy.py
@@ -804,9 +804,11 @@ def list_user_folders(user_rec, type):
if metadata[folder]['/private' + FOLDER_TYPE_ANNOTATION].endswith('.default'):
user_rec['_default_folder'] = folder
- # store confidential folder in user record
+ # store private and confidential folders in user record
if metadata[folder]['/private' + FOLDER_TYPE_ANNOTATION].endswith('.confidential') and not user_rec.has_key('_confidential_folder'):
user_rec['_confidential_folder'] = folder
+ if metadata[folder]['/private' + FOLDER_TYPE_ANNOTATION].endswith('.private') and not user_rec.has_key('_private_folder'):
+ user_rec['_private_folder'] = folder
# cache with user record
user_rec['_imap_folders'] = result
@@ -1015,6 +1017,8 @@ def store_object(object, user_rec, targetfolder=None, master=None):
# use *.confidential folder for invitations classified as confidential
if object.get_classification() == kolabformat.ClassConfidential and user_rec.has_key('_confidential_folder'):
targetfolder = user_rec['_confidential_folder']
+ elif object.get_classification() == kolabformat.ClassPrivate and user_rec.has_key('_private_folder'):
+ targetfolder = user_rec['_private_folder']
if not targetfolder:
log.error(_("Failed to save %s: no target folder found for user %r") % (object.type, user_rec['mail']))