Changeset View
Changeset View
Standalone View
Standalone View
wallace/module_invitationpolicy.py
Show First 20 Lines • Show All 413 Lines • ▼ Show 20 Lines | def process_itip_request(itip_event, policy, recipient_email, sender_email, receiving_user): | ||||
respond_with = receiving_attendee.get_participant_status(True) | respond_with = receiving_attendee.get_participant_status(True) | ||||
condition_fulfilled = True | condition_fulfilled = True | ||||
# find existing event in user's calendar | # find existing event in user's calendar | ||||
(existing, master) = find_existing_object(itip_event['uid'], itip_event['type'], itip_event['recurrence-id'], receiving_user, True) | (existing, master) = find_existing_object(itip_event['uid'], itip_event['type'], itip_event['recurrence-id'], receiving_user, True) | ||||
# compare sequence number to determine a (re-)scheduling request | # compare sequence number to determine a (re-)scheduling request | ||||
if existing is not None: | if existing is not None: | ||||
log.debug(_("Existing %s: %r") % (existing.type, existing), level=9) | |||||
scheduling_required = itip_event['sequence'] > 0 and itip_event['sequence'] > existing.get_sequence() | scheduling_required = itip_event['sequence'] > 0 and itip_event['sequence'] > existing.get_sequence() | ||||
log.debug(_("Scheduling required: %r, for existing %s: %s") % (scheduling_required, existing.type, existing.get_uid()), level=8) | |||||
save_object = True | save_object = True | ||||
# if scheduling: check availability (skip that for tasks) | # if scheduling: check availability (skip that for tasks) | ||||
if scheduling_required: | if scheduling_required: | ||||
if not is_task and policy & (COND_IF_AVAILABLE | COND_IF_CONFLICT): | if not is_task and policy & (COND_IF_AVAILABLE | COND_IF_CONFLICT): | ||||
condition_fulfilled = check_availability(itip_event, receiving_user) | condition_fulfilled = check_availability(itip_event, receiving_user) | ||||
if not is_task and policy & COND_IF_CONFLICT: | if not is_task and policy & COND_IF_CONFLICT: | ||||
condition_fulfilled = not condition_fulfilled | condition_fulfilled = not condition_fulfilled | ||||
▲ Show 20 Lines • Show All 1,005 Lines • Show Last 20 Lines |