[CalendarServer-changes] [5860] CalendarServer/branches/users/wsanchez/deployment-pre-partition/ twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jul 7 18:25:30 PDT 2010
Revision: 5860
http://trac.macosforge.org/projects/calendarserver/changeset/5860
Author: cdaboo at apple.com
Date: 2010-07-07 18:25:29 -0700 (Wed, 07 Jul 2010)
Log Message:
-----------
Allow configurable limit on number of freebusy attendees in one request.
Modified Paths:
--------------
CalendarServer/branches/users/wsanchez/deployment-pre-partition/twistedcaldav/config.py
CalendarServer/branches/users/wsanchez/deployment-pre-partition/twistedcaldav/schedule.py
Modified: CalendarServer/branches/users/wsanchez/deployment-pre-partition/twistedcaldav/config.py
===================================================================
--- CalendarServer/branches/users/wsanchez/deployment-pre-partition/twistedcaldav/config.py 2010-07-08 01:23:52 UTC (rev 5859)
+++ CalendarServer/branches/users/wsanchez/deployment-pre-partition/twistedcaldav/config.py 2010-07-08 01:25:29 UTC (rev 5860)
@@ -278,7 +278,8 @@
"IdleConnectionTimeOut": 15,
"UIDReservationTimeOut": 30 * 60,
- "MaxAllowedInstances": 3000,
+ "MaxAllowedInstances": 3000,
+ "LimitFreeBusyAttendees": 30,
#
# Localization
Modified: CalendarServer/branches/users/wsanchez/deployment-pre-partition/twistedcaldav/schedule.py
===================================================================
--- CalendarServer/branches/users/wsanchez/deployment-pre-partition/twistedcaldav/schedule.py 2010-07-08 01:23:52 UTC (rev 5859)
+++ CalendarServer/branches/users/wsanchez/deployment-pre-partition/twistedcaldav/schedule.py 2010-07-08 01:25:29 UTC (rev 5860)
@@ -442,7 +442,7 @@
# Loop over each recipient and do appropriate action.
autoresponses = []
- for recipient in recipients:
+ for ctr, recipient in enumerate(recipients):
# Yield to the reactor once through each loop if more than one attendee
if len(recipients) > 1:
@@ -490,6 +490,14 @@
# Different behaviour for free-busy vs regular invite
if freebusy:
+
+ # Check for freebusy limit
+ if ctr >= config.LimitFreeBusyAttendees:
+ err = HTTPError(ErrorResponse(responsecode.NOT_FOUND, (caldav_namespace, "recipient-limit")))
+ responses.add(recipient, Failure(exc_value=err), reqstatus="5.3;No scheduling support for user")
+ recipientsState["BAD"] += 1
+ continue
+
# Extract the ATTENDEE property matching current recipient from the calendar data
cuas = principal.calendarUserAddresses()
attendeeProp = calendar.getAttendeeProperty(cuas)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100707/88bcd0af/attachment-0001.html>
More information about the calendarserver-changes
mailing list