[CalendarServer-changes] [489] CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/ static.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Nov 16 12:27:25 PST 2006


Revision: 489
          http://trac.macosforge.org/projects/calendarserver/changeset/489
Author:   wsanchez at apple.com
Date:     2006-11-16 12:27:24 -0800 (Thu, 16 Nov 2006)

Log Message:
-----------
Add autorespond property to a resource's inbox when we create it, so
that resources get autorespond by default.

Modified Paths:
--------------
    CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/static.py

Modified: CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/static.py	2006-11-16 20:02:06 UTC (rev 488)
+++ CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/static.py	2006-11-16 20:27:24 UTC (rev 489)
@@ -542,8 +542,14 @@
             ("outbox", ScheduleOutboxFile),
         ):
             child_fp = self.fp.child(name)
-            if not child_fp.exists(): child_fp.makedirs()
-            self.putChild(name, cls(child_fp.path))
+            child = cls(child_fp.path)
+            if not child_fp.exists():
+                child_fp.makedirs()
+                if record.recordType == "resource" and child == "inbox":
+                    # Resources should have autorespond turned on by default,
+                    # since they typically don't have someone responding for them.
+                    child.writeDeadProperty(customxml.TwistedScheduleAutoRespond())
+            self.putChild(name, child)
 
     def url(self):
         return joinURL(self._parent.url(), self.record.shortName)

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


More information about the calendarserver-changes mailing list