[CalendarServer-changes] [3627] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Sat Jan 31 18:54:28 PST 2009


Revision: 3627
          http://trac.macosforge.org/projects/calendarserver/changeset/3627
Author:   cdaboo at apple.com
Date:     2009-01-31 18:54:28 -0800 (Sat, 31 Jan 2009)
Log Message:
-----------
Make sure none property store is used for non-file paths. Also iMIP inbox should only appear when enabled.

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tap/caldav.py
    CalendarServer/trunk/run
    CalendarServer/trunk/twistedcaldav/mail.py
    CalendarServer/trunk/twistedcaldav/static.py

Modified: CalendarServer/trunk/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/caldav.py	2009-02-01 02:51:25 UTC (rev 3626)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py	2009-02-01 02:54:28 UTC (rev 3627)
@@ -1,5 +1,5 @@
 ##
-# Copyright (c) 2005-2008 Apple Inc. All rights reserved.
+# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -507,12 +507,13 @@
         #
         # IMIP delivery resource
         #
-        self.log_info("Setting up iMIP inbox resource: %r"
-                      % (self.imipResourceClass,))
+        if config.Scheduling.iMIP.Enabled:
+            self.log_info("Setting up iMIP inbox resource: %r"
+                          % (self.imipResourceClass,))
+    
+            imipInbox = self.imipResourceClass(root)
+            root.putChild("inbox", imipInbox)
 
-        imipInbox = self.imipResourceClass(root)
-        root.putChild("inbox", imipInbox)
-
         #
         # Configure ancillary data
         #

Modified: CalendarServer/trunk/run
===================================================================
--- CalendarServer/trunk/run	2009-02-01 02:51:25 UTC (rev 3626)
+++ CalendarServer/trunk/run	2009-02-01 02:54:28 UTC (rev 3627)
@@ -692,7 +692,7 @@
 
 caldavtester="${top}/CalDAVTester";
 
-svn_get "CalDAVTester" "${caldavtester}" "${svn_uri_base}/CalDAVTester/trunk" 3622;
+svn_get "CalDAVTester" "${caldavtester}" "${svn_uri_base}/CalDAVTester/trunk" 3626;
 
 #
 # Calendar Server

Modified: CalendarServer/trunk/twistedcaldav/mail.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/mail.py	2009-02-01 02:51:25 UTC (rev 3626)
+++ CalendarServer/trunk/twistedcaldav/mail.py	2009-02-01 02:54:28 UTC (rev 3627)
@@ -1,5 +1,5 @@
 ##
-# Copyright (c) 2005-2008 Apple Inc. All rights reserved.
+# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -34,6 +34,7 @@
 from twisted.web import resource, server, client
 from twisted.web2 import responsecode
 from twisted.web2.dav import davxml
+from twisted.web2.dav.noneprops import NonePropertyStore
 from twisted.web2.http import Response, HTTPError
 from twisted.web2.http_headers import MimeType
 
@@ -185,8 +186,10 @@
     def isPseudoCalendarCollection(self):
         return False
 
-    def hasDeadProperty(self, name):
-        return False
+    def deadProperties(self):
+        if not hasattr(self, "_dead_properties"):
+            self._dead_properties = NonePropertyStore(self)
+        return self._dead_properties
 
     def etag(self):
         return None

Modified: CalendarServer/trunk/twistedcaldav/static.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/static.py	2009-02-01 02:51:25 UTC (rev 3626)
+++ CalendarServer/trunk/twistedcaldav/static.py	2009-02-01 02:54:28 UTC (rev 3627)
@@ -1,5 +1,5 @@
 ##
-# Copyright (c) 2005-2008 Apple Inc. All rights reserved.
+# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -48,6 +48,7 @@
 from twisted.web2.dav.fileop import mkcollection, rmdir
 from twisted.web2.dav.http import ErrorResponse
 from twisted.web2.dav.idav import IDAVResource
+from twisted.web2.dav.noneprops import NonePropertyStore
 from twisted.web2.dav.resource import AccessDeniedError
 from twisted.web2.dav.resource import davPrivilegeSet
 from twisted.web2.dav.util import parentForURL, bindMethods
@@ -864,9 +865,6 @@
     def __init__(self, path, parent):
         CalDAVFile.__init__(self, path, principalCollections=parent.principalCollections())
         IScheduleInboxResource.__init__(self, parent)
-        
-        self.fp.open("w").close()
-        self.fp.restat(False)
 
     def __repr__(self):
         return "<%s (server-to-server inbox resource): %s>" % (self.__class__.__name__, self.fp.path)
@@ -892,8 +890,10 @@
             (caldav_namespace, "calendar-collection-location-ok")
         )
 
-    def hasDeadProperty(self, name):
-        return False
+    def deadProperties(self):
+        if not hasattr(self, "_dead_properties"):
+            self._dead_properties = NonePropertyStore(self)
+        return self._dead_properties
 
     def etag(self):
         return None
@@ -1015,8 +1015,10 @@
             (caldav_namespace, "calendar-collection-location-ok")
         )
 
-    def hasDeadProperty(self, name):
-        return False
+    def deadProperties(self):
+        if not hasattr(self, "_dead_properties"):
+            self._dead_properties = NonePropertyStore(self)
+        return self._dead_properties
 
     def etag(self):
         return None
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090131/0673fb74/attachment-0001.html>


More information about the calendarserver-changes mailing list