[CalendarServer-changes] [3206] CalendarServer/trunk/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Tue Oct 21 20:34:24 PDT 2008
Revision: 3206
http://trac.macosforge.org/projects/calendarserver/changeset/3206
Author: cdaboo at apple.com
Date: 2008-10-21 20:34:24 -0700 (Tue, 21 Oct 2008)
Log Message:
-----------
Remove option to manually trigger auto-accept behavior. The way to do that now is to simply re-invite
the auto-accept room/resource as the organizer using PUT.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/config.py
CalendarServer/trunk/twistedcaldav/schedule.py
Modified: CalendarServer/trunk/twistedcaldav/config.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/config.py 2008-10-21 23:24:19 UTC (rev 3205)
+++ CalendarServer/trunk/twistedcaldav/config.py 2008-10-22 03:34:24 UTC (rev 3206)
@@ -187,7 +187,6 @@
"EnableDropBox" : False, # Calendar Drop Box
"EnablePrivateEvents" : False, # Private Events
"EnableTimezoneService" : False, # Timezone service
- "EnableAutoAcceptTrigger" : False, # Manually trigger auto-accept behavior
#
# Scheduling related options
Modified: CalendarServer/trunk/twistedcaldav/schedule.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/schedule.py 2008-10-21 23:24:19 UTC (rev 3205)
+++ CalendarServer/trunk/twistedcaldav/schedule.py 2008-10-22 03:34:24 UTC (rev 3206)
@@ -184,82 +184,6 @@
fbset.remove(uri)
self.writeDeadProperty(caldavxml.CalendarFreeBusySet(*[davxml.HRef(url) for url in fbset]))
-
- @inlineCallbacks
- def http_GET(self, request):
- """
- Special behavior - if the inbox belongs to an auto-accept calendar user, then trigger
- auto-accept processing on any stored items in the inbox.
- """
-
- if config.EnableAutoAcceptTrigger:
- from twisted.internet import reactor
-
- # Look for auto-accept request parameter
- if request.args:
- autoaccept = request.args.get("auto-accept", ("",))
- if len(autoaccept) != 1:
- raise HTTPError(ErrorResponse(responsecode.BAD_REQUEST, (calendarserver_namespace, "valid-autoaccept")))
-
- # Check authentication and access controls
- yield self.authorize(request, (davxml.Write(),))
-
- # Find out who the inbox belongs to
- principal = self.parent.principalForRecord()
-
- # If they are an auto-accept calendar user, do special processing
- if principal.autoSchedule() and autoaccept[0].lower() == "true":
-
- # Now look at each child resource - order by last-modified
- children = []
- for name, uid, type in self.index().search(None): #@UnusedVariable
- try:
- child = yield request.locateChildResource(self, name)
- child = IDAVResource(child)
- except TypeError:
- child = None
-
- if child is not None:
- # Check privileges of child - skip if access denied
- try:
- yield child.checkPrivileges(request, (davxml.Write(),))
- except AccessDeniedError:
- continue
- calendar = self.iCalendar(name)
- children.append((child, calendar,))
-
- # Sort by last modified
- children.sort(key=lambda x: x[0].lastModified())
-
- # Now process each one in order
- for child, calendar in children:
- reactor.callLater(0.0, itip.handleRequest, *(request, principal, self, calendar, child)) #@UndefinedVariable
-
- if (len(children)):
- response_text = "Started auto-processing of %d iTIP messages." % (len(children,))
- else:
- response_text = "There are no iTIP messages to auto-process."
-
- else:
- response_text = "This calendar user does not auto-accept invites."
-
- # Return some useful information
- response = Response(200, {}, """<html>
-<head>
-<title>Schedule Inbox Auto Processing</title>
-</head>
-<body>
-<h1>%s</h1>
-</body>
-</html>""" % (response_text,)
- )
-
- response.headers.setHeader("content-type", MimeType("text", "html", {"charset": "utf-8"}))
- returnValue(response)
-
- response = (yield super(ScheduleInboxResource, self).http_GET(request))
- returnValue(response)
-
class ScheduleOutboxResource (CalendarSchedulingCollectionResource):
"""
CalDAV schedule Outbox resource.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081021/022c3595/attachment.html>
More information about the calendarserver-changes
mailing list