[CalendarServer-changes] [5861] CalendarServer/branches/users/wsanchez/deployment/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jul 7 18:54:01 PDT 2010
Revision: 5861
http://trac.macosforge.org/projects/calendarserver/changeset/5861
Author: cdaboo at apple.com
Date: 2010-07-07 18:54:00 -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/twistedcaldav/config.py
CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/scheduling/scheduler.py
Modified: CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/config.py
===================================================================
--- CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/config.py 2010-07-08 01:25:29 UTC (rev 5860)
+++ CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/config.py 2010-07-08 01:54:00 UTC (rev 5861)
@@ -359,7 +359,8 @@
"IdleConnectionTimeOut": 15,
"UIDReservationTimeOut": 30 * 60,
- "MaxAllowedInstances": 3000,
+ "MaxAllowedInstances": 3000,
+ "LimitFreeBusyAttendees": 30,
#
# Localization
Modified: CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/scheduling/scheduler.py
===================================================================
--- CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/scheduling/scheduler.py 2010-07-08 01:25:29 UTC (rev 5860)
+++ CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/scheduling/scheduler.py 2010-07-08 01:54:00 UTC (rev 5861)
@@ -28,6 +28,7 @@
from twistedcaldav import caldavxml
from twistedcaldav.accounting import accountingEnabled, emitAccounting
from twistedcaldav.caldavxml import caldav_namespace, TimeRange
+from twistedcaldav.config import config
from twistedcaldav.customxml import calendarserver_namespace
from twistedcaldav.extensions import ErrorResponse
from twistedcaldav.ical import Component
@@ -378,8 +379,14 @@
# Loop over each recipient and aggregate into lists by service types.
caldav_recipients = []
remote_recipients = []
- for recipient in self.recipients:
+ for ctr, recipient in enumerate(self.recipients):
+ # Check for freebusy limit
+ if freebusy and ctr >= config.LimitFreeBusyAttendees:
+ err = HTTPError(ErrorResponse(responsecode.NOT_FOUND, (caldav_namespace, "recipient-limit")))
+ responses.add(recipient.cuaddr, Failure(exc_value=err), reqstatus=iTIPRequestStatus.NO_USER_SUPPORT)
+ continue
+
if self.fakeTheResult:
responses.add(recipient.cuaddr, responsecode.OK, reqstatus=iTIPRequestStatus.SUCCESS if freebusy else iTIPRequestStatus.MESSAGE_DELIVERED)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100707/481a4e74/attachment.html>
More information about the calendarserver-changes
mailing list