Changeset View
Changeset View
Standalone View
Standalone View
wallace/module_invitationpolicy.py
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | policy_name_map = { | ||||
'ACT_UPDATE': ACT_UPDATE + COND_TYPE_ALL, | 'ACT_UPDATE': ACT_UPDATE + COND_TYPE_ALL, | ||||
'ACT_UPDATE_AND_NOTIFY': ACT_UPDATE_AND_NOTIFY + COND_TYPE_ALL, | 'ACT_UPDATE_AND_NOTIFY': ACT_UPDATE_AND_NOTIFY + COND_TYPE_ALL, | ||||
'ACT_CANCEL_DELETE': ACT_CANCEL_DELETE + COND_TYPE_ALL, | 'ACT_CANCEL_DELETE': ACT_CANCEL_DELETE + COND_TYPE_ALL, | ||||
'ACT_CANCEL_DELETE_AND_NOTIFY': ACT_CANCEL_DELETE_AND_NOTIFY + COND_TYPE_ALL, | 'ACT_CANCEL_DELETE_AND_NOTIFY': ACT_CANCEL_DELETE_AND_NOTIFY + COND_TYPE_ALL, | ||||
'ACT_SAVE_TO_CALENDAR': ACT_SAVE_TO_FOLDER + COND_TYPE_EVENT, | 'ACT_SAVE_TO_CALENDAR': ACT_SAVE_TO_FOLDER + COND_TYPE_EVENT, | ||||
'ACT_SAVE_AND_FORWARD': ACT_SAVE_AND_FORWARD + COND_TYPE_EVENT, | 'ACT_SAVE_AND_FORWARD': ACT_SAVE_AND_FORWARD + COND_TYPE_EVENT, | ||||
} | } | ||||
policy_value_map = dict([(v &~ COND_TYPE_ALL, k) for (k, v) in policy_name_map.iteritems()]) | policy_value_map = dict([(v &~ COND_TYPE_ALL, k) for (k, v) in policy_name_map.items()]) | ||||
object_type_conditons = { | object_type_conditons = { | ||||
'event': COND_TYPE_EVENT, | 'event': COND_TYPE_EVENT, | ||||
'task': COND_TYPE_TASK | 'task': COND_TYPE_TASK | ||||
} | } | ||||
log = pykolab.getLogger('pykolab.wallace/invitationpolicy') | log = pykolab.getLogger('pykolab.wallace/invitationpolicy') | ||||
extra_log_params = {'qid': '-'} | extra_log_params = {'qid': '-'} | ||||
▲ Show 20 Lines • Show All 1,088 Lines • ▼ Show 20 Lines | if reply: | ||||
return | return | ||||
# build notification message body | # build notification message body | ||||
roundup = '' | roundup = '' | ||||
if itip_comment is not None: | if itip_comment is not None: | ||||
roundup += "\n" + itip_comment | roundup += "\n" + itip_comment | ||||
for status,attendees in partstats.iteritems(): | for status,attendees in partstats.items(): | ||||
if len(attendees) > 0: | if len(attendees) > 0: | ||||
roundup += "\n" + participant_status_label(status) + ":\n\t" + "\n\t".join(attendees) + "\n" | roundup += "\n" + participant_status_label(status) + ":\n\t" + "\n\t".join(attendees) + "\n" | ||||
else: | else: | ||||
# build notification message body | # build notification message body | ||||
roundup = '' | roundup = '' | ||||
if itip_comment is not None: | if itip_comment is not None: | ||||
roundup += "\n" + itip_comment | roundup += "\n" + itip_comment | ||||
▲ Show 20 Lines • Show All 226 Lines • Show Last 20 Lines |