[CalendarServer-changes] [1309] CalendarServer/trunk/twistedcaldav/itip.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Mar 5 11:04:39 PST 2007


Revision: 1309
          http://trac.macosforge.org/projects/calendarserver/changeset/1309
Author:   cdaboo at apple.com
Date:     2007-03-05 11:04:38 -0800 (Mon, 05 Mar 2007)

Log Message:
-----------
No longer save Outbox items.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/itip.py

Modified: CalendarServer/trunk/twistedcaldav/itip.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/itip.py	2007-03-05 19:03:19 UTC (rev 1308)
+++ CalendarServer/trunk/twistedcaldav/itip.py	2007-03-05 19:04:38 UTC (rev 1309)
@@ -243,10 +243,6 @@
             yield newchild
             newchild = newchild.getResult()
             newInboxResource(child, newchild)
-            logging.info("[ITIP]: saving iTIP REPLY %s" % (("declined","accepted")[accepted],))
-            newchild = waitForDeferred(saveReply(request, principal, replycal, inbox))
-            yield newchild
-            newchild = newchild.getResult()
 
         # Store CALDAV:schedule-state property
         assert child.fp.exists()
@@ -577,41 +573,6 @@
 
 writeReply = deferredGenerator(writeReply)
 
-def saveReply(request, principal, replycal, ainbox):
-    """
-    Write an iTIP message reply into the specified principal's Outbox.
-    
-    @param request: the L{twisted.web2.server.Request} for the current request.
-    @param principal: the L{CalendarPrincipalFile} principal resource for the principal we are dealing with.
-    @param replycal: the L{Component} for the iTIP message reply.
-    @param ainbox: the L{ScheduleInboxFile} for the principal's Inbox.
-    """
-    
-    # Get the Outbox of the principal
-    outboxURL = principal.scheduleOutboxURL()
-    assert outboxURL
-    
-    # Determine whether current principal has CALDAV:schedule right on that Outbox
-    outbox = waitForDeferred(request.locateResource(outboxURL))
-    yield outbox
-    outbox = outbox.getResult()
-
-    try:
-        d = waitForDeferred(outbox.checkPrivileges(request, (caldavxml.Schedule(),), principal=davxml.Principal(davxml.HRef.fromString(principal.principalURL()))))
-        yield d
-        d.getResult()
-    except:
-        logging.info("[ITIP]: could not save reply as %s does not have CALDAV:schedule permission on their Outbox." % (principal.principalURL(),))
-        yield None
-        return
-    
-    # Now deposit the new calendar into the inbox
-    d = waitForDeferred(writeResource(request, outboxURL, outbox, None, replycal))
-    yield d
-    yield d.getResult()
-
-saveReply = deferredGenerator(saveReply)    
-
 def writeResource(request, collURL, collection, name, calendar):
     """
     Write out the calendar resource (iTIP) message to the specified calendar, either over-writing the named

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070305/4166c937/attachment.html


More information about the calendarserver-changes mailing list