[CalendarServer-changes] [325]
CalendarServer/branches/users/cdaboo/dropbox
source_changes at macosforge.org
source_changes at macosforge.org
Fri Oct 27 13:30:21 PDT 2006
Revision: 325
http://trac.macosforge.org/projects/calendarserver/changeset/325
Author: cdaboo at apple.com
Date: 2006-10-27 13:30:21 -0700 (Fri, 27 Oct 2006)
Log Message:
-----------
merge -r288:324 http://svn.opensource.apple.com/repository/calendarserver/CalendarServer/trunk to dropbox branch.
Modified Paths:
--------------
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.__init__.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.davxml.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.element.__init__.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.element.base.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.idav.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.__init__.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.copymove.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.delete.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.put.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.resource.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.static.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.test.test_prop.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.xattrprops.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.log.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.server.patch
CalendarServer/branches/users/cdaboo/dropbox/run
CalendarServer/branches/users/cdaboo/dropbox/test
CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/db.py
CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/ical.py
CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/index.py
CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/itip.py
CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/method/delete.py
CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/method/put_common.py
CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/method/report_common.py
CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/resource.py
CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/static.py
Added Paths:
-----------
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.iweb.patch
CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/extensions.py
Removed Paths:
-------------
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.proppatch.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.report_principal_match.patch
CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.report_principal_property_search.patch
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.__init__.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.__init__.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.__init__.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/__init__.py
===================================================================
---- twisted/web2/dav/__init__.py (revision 18375)
+--- twisted/web2/dav/__init__.py (revision 18545)
+++ twisted/web2/dav/__init__.py (working copy)
@@ -45,6 +45,7 @@
"noneprops",
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.davxml.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.davxml.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.davxml.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/davxml.py
===================================================================
---- twisted/web2/dav/davxml.py (revision 18375)
+--- twisted/web2/dav/davxml.py (revision 18545)
+++ twisted/web2/dav/davxml.py (working copy)
@@ -45,6 +45,7 @@
from twisted.web2.dav.element.rfc2518 import *
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.element.__init__.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.element.__init__.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.element.__init__.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/element/__init__.py
===================================================================
---- twisted/web2/dav/element/__init__.py (revision 18375)
+--- twisted/web2/dav/element/__init__.py (revision 18545)
+++ twisted/web2/dav/element/__init__.py (working copy)
@@ -35,4 +35,5 @@
"rfc2518",
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.element.base.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.element.base.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.element.base.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/element/base.py
===================================================================
---- twisted/web2/dav/element/base.py (revision 18375)
+--- twisted/web2/dav/element/base.py (revision 18545)
+++ twisted/web2/dav/element/base.py (working copy)
@@ -190,14 +190,93 @@
return child in self.children
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.idav.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.idav.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.idav.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/idav.py
===================================================================
---- twisted/web2/dav/idav.py (revision 18375)
+--- twisted/web2/dav/idav.py (revision 18545)
+++ twisted/web2/dav/idav.py (working copy)
@@ -41,7 +41,7 @@
otherwise.
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.__init__.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.__init__.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.__init__.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/method/__init__.py
===================================================================
---- twisted/web2/dav/method/__init__.py (revision 18375)
+--- twisted/web2/dav/method/__init__.py (revision 18545)
+++ twisted/web2/dav/method/__init__.py (working copy)
@@ -40,6 +40,7 @@
"proppatch",
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.copymove.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.copymove.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.copymove.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/method/copymove.py
===================================================================
---- twisted/web2/dav/method/copymove.py (revision 18375)
+--- twisted/web2/dav/method/copymove.py (revision 18545)
+++ twisted/web2/dav/method/copymove.py (working copy)
@@ -38,7 +38,7 @@
from twisted.web2.filter.location import addLocation
@@ -29,8 +29,8 @@
yield x.getResult()
@@ -144,7 +152,14 @@
- # May need to add a location header
- addLocation(request, destination_uri)
+ log.err(msg)
+ raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, msg))
- x = waitForDeferred(move(self.fp, request.uri, destination.fp, destination_uri, depth))
+ #x = waitForDeferred(move(self.fp, request.uri, destination.fp, destination_uri, depth))
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.delete.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.delete.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.delete.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/method/delete.py
===================================================================
---- twisted/web2/dav/method/delete.py (revision 18375)
+--- twisted/web2/dav/method/delete.py (revision 18545)
+++ twisted/web2/dav/method/delete.py (working copy)
@@ -58,8 +58,28 @@
yield x
Deleted: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,50 +0,0 @@
-Index: twisted/web2/dav/method/propfind.py
-===================================================================
---- twisted/web2/dav/method/propfind.py (revision 18375)
-+++ twisted/web2/dav/method/propfind.py (working copy)
-@@ -102,11 +102,15 @@
-
- xml_responses = []
-
-- # FIXME: take advantage of the new generative properties of findChildren
-+ # Do some optimisation of access control calculation by determining any inherited ACLs outside of
-+ # the child resource loop and supply those to the checkPrivileges on each child.
-+ filteredaces = waitForDeferred(self.inheritedACEsforChildren(request))
-+ yield filteredaces
-+ filteredaces = filteredaces.getResult()
-
- resources = [(self, None)]
-
-- d = self.findChildren(depth, request, lambda x, y: resources.append((x, y)), (davxml.Read(),))
-+ d = self.findChildren(depth, request, lambda x, y: resources.append((x, y)), (davxml.Read(),), inherited_aces=filteredaces)
- x = waitForDeferred(d)
- yield x
- x.getResult()
-@@ -116,11 +120,11 @@
- uri = normalizeURL(request_uri)
- if self.isCollection() and not uri.endswith("/"): uri += "/"
-
-- resource_properties = waitForDeferred(resource.listProperties(request))
-- yield resource_properties
-- resource_properties = resource_properties.getResult()
-+ if search_properties is "names":
-+ resource_properties = waitForDeferred(resource.listProperties(request))
-+ yield resource_properties
-+ resource_properties = resource_properties.getResult()
-
-- if search_properties is "names":
- properties_by_status = {
- responsecode.OK: [propertyName(p) for p in resource_properties]
- }
-@@ -138,7 +142,10 @@
- properties_to_enumerate = search_properties
-
- for property in properties_to_enumerate:
-- if property in resource_properties:
-+ has = waitForDeferred(resource.hasProperty(property, request))
-+ yield has
-+ has = has.getResult()
-+ if has:
- try:
- resource_property = waitForDeferred(resource.readProperty(property, request))
- yield resource_property
Deleted: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.proppatch.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.proppatch.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.proppatch.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,13 +0,0 @@
-Index: twisted/web2/dav/method/proppatch.py
-===================================================================
---- twisted/web2/dav/method/proppatch.py (revision 18375)
-+++ twisted/web2/dav/method/proppatch.py (working copy)
-@@ -105,7 +105,7 @@
- if has:
- oldProperty = waitForDeferred(self.readProperty(property, request))
- yield oldProperty
-- oldProperty.getResult()
-+ oldProperty = oldProperty.getResult()
-
- def undo():
- return self.writeProperty(oldProperty, request)
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.put.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.put.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.put.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/method/put.py
===================================================================
---- twisted/web2/dav/method/put.py (revision 18375)
+--- twisted/web2/dav/method/put.py (revision 18545)
+++ twisted/web2/dav/method/put.py (working copy)
@@ -34,7 +34,7 @@
from twisted.web2 import responsecode
Deleted: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.report_principal_match.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.report_principal_match.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.report_principal_match.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,46 +0,0 @@
-Index: twisted/web2/dav/method/report_principal_match.py
-===================================================================
---- twisted/web2/dav/method/report_principal_match.py (revision 18375)
-+++ twisted/web2/dav/method/report_principal_match.py (working copy)
-@@ -89,13 +89,21 @@
- responses = []
- matchcount = 0
-
-+ selfPrincipal = self.currentPrincipal(request).children[0]
-+
-+ # Do some optimisation of access control calculation by determining any inherited ACLs outside of
-+ # the child resource loop and supply those to the checkPrivileges on each child.
-+ filteredaces = waitForDeferred(self.inheritedACEsforChildren(request))
-+ yield filteredaces
-+ filteredaces = filteredaces.getResult()
-+
-+ children = []
-+ d = waitForDeferred(self.findChildren("infinity", request, lambda x, y: children.append((x,y)),
-+ privileges=(davxml.Read(),), inherited_aces=filteredaces))
-+ yield d
-+ d.getResult()
-+
- if lookForPrincipals:
-- selfPrincipal = self.currentPrincipal(request).children[0]
--
-- children = []
-- d = waitForDeferred(self.findChildren("infinity", request, lambda x, y: children.append((x,y)), privileges=(davxml.Read(),)))
-- yield d
-- d.getResult()
-
- for child, uri in children:
- if isPrincipalResource(child) and child.principalMatch(selfPrincipal):
-@@ -115,13 +123,6 @@
- yield d
- d.getResult()
- else:
-- selfPrincipal = self.currentPrincipal(request).children[0]
--
-- children = []
-- d = waitForDeferred(self.findChildren("infinity", request, lambda x, y: children.append((x,y)), privileges=(davxml.Read(),)))
-- yield d
-- d.getResult()
--
- for child, uri in children:
- # Try to read the requested property from this resource
- try:
Deleted: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.report_principal_property_search.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.report_principal_property_search.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.method.report_principal_property_search.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,21 +0,0 @@
-Index: twisted/web2/dav/method/report_principal_property_search.py
-===================================================================
---- twisted/web2/dav/method/report_principal_property_search.py (revision 18375)
-+++ twisted/web2/dav/method/report_principal_property_search.py (working copy)
-@@ -145,8 +145,15 @@
- # Loop over all collections and principal resources within
- for resource, ruri in resources:
-
-+ # Do some optimisation of access control calculation by determining any inherited ACLs outside of
-+ # the child resource loop and supply those to the checkPrivileges on each child.
-+ filteredaces = waitForDeferred(resource.inheritedACEsforChildren(request))
-+ yield filteredaces
-+ filteredaces = filteredaces.getResult()
-+
- children = []
-- d = waitForDeferred(resource.findChildren("infinity", request, lambda x, y: children.append((x,y)), privileges=(davxml.Read(),)))
-+ d = waitForDeferred(resource.findChildren("infinity", request, lambda x, y: children.append((x,y)),
-+ privileges=(davxml.Read(),), inherited_aces=filteredaces))
- yield d
- d.getResult()
-
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.resource.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.resource.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.resource.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/resource.py
===================================================================
---- twisted/web2/dav/resource.py (revision 18375)
+--- twisted/web2/dav/resource.py (revision 18545)
+++ twisted/web2/dav/resource.py (working copy)
@@ -130,6 +130,8 @@
(dav_namespace, "acl-restrictions" ), # RFC 3744, section 5.6
@@ -26,7 +26,7 @@
return succeed(qname in self.liveProperties or self.deadProperties().contains(qname))
def readProperty(self, property, request):
-@@ -272,6 +282,32 @@
+@@ -286,6 +296,32 @@
d.addCallback(gotACL)
return d
return ifAllowed((davxml.ReadACL(),), callback)
@@ -59,7 +59,7 @@
elif namespace == twisted_dav_namespace:
if name == "resource-class":
-@@ -352,6 +388,18 @@
+@@ -366,6 +402,18 @@
# FIXME: A set would be better here, that that's a python 2.4+ feature.
qnames = list(self.liveProperties)
@@ -78,7 +78,7 @@
for qname in self.deadProperties().list():
if (qname not in qnames) and (qname[0] != twisted_private_namespace):
qnames.append(qname)
-@@ -356,7 +404,9 @@
+@@ -370,7 +418,9 @@
if (qname not in qnames) and (qname[0] != twisted_private_namespace):
qnames.append(qname)
@@ -89,102 +89,16 @@
def listAllprop(self, request):
"""
-@@ -474,7 +524,7 @@
- """
- unimplemented(self)
-
-- def findChildren(self, depth, request, callback, privileges=None):
-+ def findChildren(self, depth, request, callback, privileges=None, inherited_aces=None):
- """
- See L{IDAVResource.findChildren}.
-
-@@ -491,7 +541,7 @@
- if privileges is None:
- return child
-
-- ca = child.checkPrivileges(request, privileges)
-+ ca = child.checkPrivileges(request, privileges, inherited_aces=inherited_aces)
- ca.addCallback(lambda _: child)
- return ca
-
-@@ -514,7 +564,7 @@
+@@ -535,7 +585,7 @@
completionDeferred.callback(None)
else:
childpath = joinURL(basepath, childname)
- child = request.locateResource(childpath)
+ child = request.locateChildResource(self, childname)
- child.addCallback(_checkPrivileges)
- child.addCallbacks(_gotChild, _checkPrivilegesError, (childpath,))
+ child.addCallback(checkPrivileges)
+ child.addCallbacks(gotChild, checkPrivilegesError, (childpath,))
child.addErrback(completionDeferred.errback)
-@@ -530,6 +580,43 @@
-
- return completionDeferred
-
-+# def findChildren(self, depth, request, callback, privileges=None, inherited_aces=None):
-+# """
-+# See L{IDAVResource.findChildren}.
-+#
-+# This implementation works for C{depth} values of C{"0"}, C{"1"},
-+# and C{"infinity"}. As long as C{self.listChildren} is implemented
-+# """
-+# assert depth in ("0", "1", "infinity"), "Invalid depth: %s" % (depth,)
-+#
-+# completionDeferred = Deferred()
-+#
-+# if depth != "0" and self.isCollection():
-+# basepath = request.urlForResource(self)
-+# children = self.listChildren()
-+# for childname in children:
-+# childpath = joinURL(basepath, childname)
-+# child = waitForDeferred(request.locateResource(childpath))
-+# yield child
-+# child = child.getResult()
-+# if privileges is not None:
-+# try:
-+# d = waitForDeferred(child.checkPrivileges(request, privileges, inherited_aces=inherited_aces))
-+# yield d
-+# d.getResult()
-+# except AccessDeniedError:
-+# continue
-+# if child.isCollection():
-+# callback(child, childpath + "/")
-+# if depth == "infinity":
-+# d = waitForDeferred(child.findChildren(depth, request, callback, privileges))
-+# yield d
-+# d.getResult()
-+# else:
-+# callback(child, childpath)
-+#
-+# findChildren = deferredGenerator(findChildren)
-+
- def supportedReports(self):
- """
- See L{IDAVResource.supportedReports}.
-@@ -904,10 +991,11 @@
-
- resources = [(self, None)]
-
-- x = self.findChildren(depth, request, lambda x, y: resources.append((x,y)))
-- x = waitForDeferred(x)
-- yield x
-- x.getResult()
-+ if recurse:
-+ x = self.findChildren(depth, request, lambda x, y: resources.append((x,y)))
-+ x = waitForDeferred(x)
-+ yield x
-+ x.getResult()
-
- for resource, uri in resources:
- acl = waitForDeferred(resource.accessControlList(request, inherited_aces=inherited_aces))
-@@ -1004,7 +1092,6 @@
- url = request.urlForResource(self)
-
- assert url is not None, "urlForResource(self) returned None for resource %s" % (self,)
--
- return url
-
- try:
-@@ -1501,6 +1588,265 @@
+@@ -1511,6 +1561,265 @@
return None
##
@@ -450,7 +364,7 @@
# HTTP
##
-@@ -1548,7 +1894,7 @@
+@@ -1558,7 +1867,7 @@
"""
DAV resource with no children.
"""
@@ -459,16 +373,7 @@
return succeed(None)
class DAVPrincipalResource (DAVLeafResource):
-@@ -1574,7 +1920,7 @@
- def isCollection(self):
- return False
-
-- def findChildren(self, depth, request, callback, privileges=None):
-+ def findChildren(self, depth, request, callback, privileges=None, inherited_aces=None):
- return succeed(None)
-
- def readProperty(self, property, request):
-@@ -1702,6 +2048,37 @@
+@@ -1712,6 +2021,37 @@
davxml.registerElement(TwistedACLInheritable)
davxml.ACE.allowed_children[(twisted_dav_namespace, "inheritable")] = (0, 1)
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.static.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.static.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.static.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/static.py
===================================================================
---- twisted/web2/dav/static.py (revision 18375)
+--- twisted/web2/dav/static.py (revision 18545)
+++ twisted/web2/dav/static.py (working copy)
@@ -28,16 +28,16 @@
@@ -8,10 +8,10 @@
-import os
-
--from twisted.python import log
- from twisted.internet.defer import succeed, deferredGenerator, waitForDeferred
++from twisted.internet.defer import succeed, deferredGenerator, waitForDeferred
+ from twisted.python import log
+-from twisted.internet.defer import succeed, deferredGenerator, waitForDeferred
-from twisted.web2.static import File
-+from twisted.python import log
+from twisted.web2 import http_headers
from twisted.web2 import responsecode, dirlist
-from twisted.web2.http import RedirectResponse
@@ -96,28 +96,3 @@
# Workarounds for issues with File
##
-@@ -133,11 +182,22 @@
- # Render from the index file
- standin = self.createSimilarFile(ifp.path)
- else:
-+ # Do some optimisation of access control calculation by determining any inherited ACLs outside of
-+ # the child resource loop and supply those to the checkPrivileges on each child.
-+ filteredaces = waitForDeferred(self.inheritedACEsforChildren(request))
-+ yield filteredaces
-+ filteredaces = filteredaces.getResult()
-+
- children = []
-
-+ def _childname(r, u):
-+ u = u.rstrip("/")
-+ children.append(u.split("/")[-1])
-+
- d = self.findChildren('1', request,
-- lambda r,u: children.append(os.path.basename(u)),
-- (davxml.Read(),))
-+ _childname,
-+ (davxml.Read(),),
-+ inherited_aces=filteredaces)
- d = waitForDeferred(d)
- yield d
- d = d.getResult()
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.test.test_prop.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.test.test_prop.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.test.test_prop.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/test/test_prop.py
===================================================================
---- twisted/web2/dav/test/test_prop.py (revision 18219)
+--- twisted/web2/dav/test/test_prop.py (revision 18545)
+++ twisted/web2/dav/test/test_prop.py (working copy)
@@ -21,6 +21,8 @@
#
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.xattrprops.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.xattrprops.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.dav.xattrprops.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/xattrprops.py
===================================================================
---- twisted/web2/dav/xattrprops.py (revision 18375)
+--- twisted/web2/dav/xattrprops.py (revision 18545)
+++ twisted/web2/dav/xattrprops.py (working copy)
@@ -66,16 +66,8 @@
deadPropertyXattrPrefix = "user."
Copied: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.iweb.patch (from rev 324, CalendarServer/trunk/lib-patches/Twisted/twisted.web2.iweb.patch)
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.iweb.patch (rev 0)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.iweb.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -0,0 +1,32 @@
+Index: twisted/web2/iweb.py
+===================================================================
+--- twisted/web2/iweb.py (revision 18545)
++++ twisted/web2/iweb.py (working copy)
+@@ -41,14 +41,23 @@
+ """
+
+ # Is there a better way to do this than this funky extra class?
++NotSpecified = object()
+ class SpecialAdaptInterfaceClass(interface.InterfaceClass):
+ # A special adapter for IResource to handle the extra step of adapting
+ # from IOldNevowResource-providing resources.
+- def __call__(self, other, alternate=None):
+- result = super(SpecialAdaptInterfaceClass, self).__call__(other, alternate)
+- if result is not alternate:
+- return result
++ def __call__(self, other, alternate=NotSpecified):
++ if alternate == NotSpecified:
++ try:
++ return super(SpecialAdaptInterfaceClass, self).__call__(other)
++ except TypeError:
++ pass
++ else:
++ result = super(SpecialAdaptInterfaceClass, self).__call__(other, alternate)
++ if result is not alternate:
++ return result
+
++ if alternate == NotSpecified:
++ return IOldNevowResource(other)
+ result = IOldNevowResource(other, alternate)
+ if result is not alternate:
+ return IResource(result)
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.log.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.log.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.log.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/log.py
===================================================================
---- twisted/web2/log.py (revision 18375)
+--- twisted/web2/log.py (revision 18545)
+++ twisted/web2/log.py (working copy)
@@ -88,7 +88,7 @@
class LogWrapperResource(resource.WrapperResource):
Modified: CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.server.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.server.patch 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/lib-patches/Twisted/twisted.web2.server.patch 2006-10-27 20:30:21 UTC (rev 325)
@@ -1,6 +1,6 @@
Index: twisted/web2/server.py
===================================================================
---- twisted/web2/server.py (revision 18375)
+--- twisted/web2/server.py (revision 18545)
+++ twisted/web2/server.py (working copy)
@@ -1,6 +1,8 @@
# -*- test-case-name: twisted.web2.test.test_server -*-
Modified: CalendarServer/branches/users/cdaboo/dropbox/run
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/run 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/run 2006-10-27 20:30:21 UTC (rev 325)
@@ -79,17 +79,48 @@
# Set up paths
##
-# First thing: find an appropriate python
-if [ -x "/usr/local/bin/python2.4" ]; then
- python="/usr/local/bin/python2.4";
-elif [ -x "/Library/Frameworks/Python.framework/Versions/2.4/bin/python" ]; then
- # MacPython install
- python="/Library/Frameworks/Python.framework/Versions/2.4/bin/python";
-elif [ -x "/sw/bin/python2.4" ]; then
- # For the Fink users
- python="/sw/bin/python2.4";
-else
- python="${PYTHON:=python2.4}";
+py_version ()
+{
+ local python="$1"; shift
+ echo "$("${python}" -c "from distutils.sysconfig import get_python_version; print get_python_version()")";
+}
+
+try_python ()
+{
+ local python="$1"; shift
+
+ if [ -z "${python}" ]; then return 1; fi;
+
+ if ! type "${python}" > /dev/null 2>&1; then return 1; fi;
+ local py_version="$(py_version "${python}")";
+ if [ "${py_version/./}" -lt "24" ]; then return 1; fi;
+
+ return 0;
+}
+
+for v in "" "2.5" "2.4"; do
+ for p in \
+ "${PYTHON:=}" \
+ "python${v}" \
+ "/usr/local/bin/python${v}" \
+ "/usr/local/python/bin/python${v}" \
+ "/usr/local/python${v}/bin/python${v}" \
+ "/opt/bin/python${v}" \
+ "/opt/python/bin/python${v}" \
+ "/opt/python${v}/bin/python${v}" \
+ "/Library/Frameworks/Python.framework/Versions/${v}/bin/python" \
+ "/opt/local/bin/python${v}" \
+ "/sw/bin/python${v}" \
+ ;
+ do
+ if try_python "${p}"; then python="${p}"; break; fi;
+ done;
+ if [ -n "${python:-}" ]; then break; fi;
+done;
+
+if [ -z "${python:-}" ]; then
+ echo "No suitable python found.";
+ exit 1;
fi;
if [ -z "${caldav:-}" ]; then
@@ -112,14 +143,9 @@
fi;
py_platform="$("${python}" -c "from distutils.util import get_platform; print get_platform()")";
- py_version="$("${python}" -c "from distutils.sysconfig import get_python_version; print get_python_version()")";
+ py_version="$(py_version "${python}")";
py_platform_libdir="lib.${py_platform}-${py_version}";
-if [ "${py_version/./}" -lt "24" ]; then
- echo "Wrong python version: ${py_version}.";
- exit 1;
-fi;
-
if [ -n "${install}" ] && ! echo "${install}" | grep '^/' > /dev/null; then
install="$(pwd)/${install}";
fi;
@@ -416,8 +442,8 @@
proto="svn";
;;
esac;
- svn_uri="${proto}://svn.twistedmatrix.com/svn/Twisted/branches/dav-acl-1608-1";
- svn_get "Twisted" "${twisted}" "${svn_uri}" 18479;
+ svn_uri="${proto}://svn.twistedmatrix.com/svn/Twisted/branches/dav-acl-1608-2";
+ svn_get "Twisted" "${twisted}" "${svn_uri}" 18545;
fi;
py_install "Twisted" "${twisted}";
Modified: CalendarServer/branches/users/cdaboo/dropbox/test
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/test 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/test 2006-10-27 20:30:21 UTC (rev 325)
@@ -24,7 +24,7 @@
export PYTHONPATH="$("${wd}/run" -p)";
-ulimit -S -n $(ulimit -H -n);
+ulimit -S -n 2048;
if [ $# -gt 0 ]; then
test_modules="$@";
Modified: CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/db.py
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/db.py 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/db.py 2006-10-27 20:30:21 UTC (rev 325)
@@ -25,7 +25,6 @@
from pysqlite2 import dbapi2 as sqlite
from twisted.python import log
-from twisted.python.failure import Failure
import os
db_basename = ".db.sqlite"
Copied: CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/extensions.py (from rev 324, CalendarServer/trunk/twistedcaldav/extensions.py)
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/extensions.py (rev 0)
+++ CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/extensions.py 2006-10-27 20:30:21 UTC (rev 325)
@@ -0,0 +1,39 @@
+##
+# Copyright (c) 2005-2006 Apple Computer, 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.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# DRI: Wilfredo Sanchez, wsanchez at apple.com
+##
+
+"""
+Extensions to web2.dav
+"""
+
+__all__ = [
+ "DAVResource",
+ "DAVFile",
+]
+
+import twisted.web2.dav.resource
+import twisted.web2.dav.static
+
+class DAVResource (twisted.web2.dav.resource.DAVResource):
+ """
+ Extended L{twisted.web2.dav.resource.DAVResource} implementation.
+ """
+
+class DAVFile (twisted.web2.dav.static.DAVFile):
+ """
+ Extended L{twisted.web2.dav.static.DAVFile} implementation.
+ """
Modified: CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/ical.py
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/ical.py 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/ical.py 2006-10-27 20:30:21 UTC (rev 325)
@@ -35,13 +35,14 @@
import StringIO
from vobject import newFromBehavior, readComponents
-from vobject.base import Component as vComponent
+from vobject.base import Component as vComponent
from vobject.base import ContentLine as vContentLine
-from vobject.base import ParseError as vParseError
+from vobject.base import ParseError as vParseError
from vobject.icalendar import TimezoneComponent
from vobject.icalendar import stringToDate, stringToDateTime, stringToDurations
from vobject.icalendar import utc
+from twisted.python import log
from twisted.web2.stream import IStream
from twisted.web2.dav.util import allDataFromStream
@@ -214,6 +215,8 @@
else:
raise AssertionError("name may not be None")
+ # FIXME: _parent is not use internally, and appears to be used elsewhere,
+ # even though it's names as a private variable.
if "parent" in kwargs:
parent = kwargs["parent"]
@@ -238,7 +241,8 @@
def __ne__(self, other): return not self.__eq__(other)
def __eq__(self, other):
- if not isinstance(other, Component): return False
+ if not isinstance(other, Component):
+ return False
my_properties = set(self.properties())
for property in other.properties():
@@ -260,6 +264,7 @@
return True
+ # FIXME: Should this not be in __eq__?
def same(self, other):
return self._vobject == other._vobject
@@ -727,12 +732,8 @@
@raise ValueError: if the given calendar component is not valid for
use as a X{CalDAV} resource.
"""
- if self.name() != "VCALENDAR": raise ValueError("Not a calendar")
- if not self.resourceType(): raise ValueError("Unknown resource type")
+ self.validCalendarForCalDAV()
- version = self.propertyValue("VERSION")
- if version != "2.0": raise ValueError("Not a version 2.0 iCalendar (version=%s)" % (version,))
-
# Disallowed in CalDAV-Access-08, section 4.1
if self.hasProperty("METHOD"):
raise ValueError("METHOD property is not allowed in CalDAV iCalendar data")
Modified: CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/index.py
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/index.py 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/index.py 2006-10-27 20:30:21 UTC (rev 325)
@@ -35,7 +35,6 @@
from pysqlite2 import dbapi2 as sqlite
from twisted.python import log
-from twisted.python.failure import Failure
from twistedcaldav.dateops import normalizeForIndex
from twistedcaldav.ical import Component
@@ -234,7 +233,7 @@
else:
qualifiers = None
if qualifiers is not None:
- rowiter = self._db_execute("select RESOURCE.NAME, RESOURCE.UID, RESOURCE.TYPE" + qualifiers[0], *qualifiers[1])
+ rowiter = self._db_execute("select DISTINCT RESOURCE.NAME, RESOURCE.UID, RESOURCE.TYPE" + qualifiers[0], *qualifiers[1])
else:
rowiter = self._db_execute("select NAME, UID, TYPE from RESOURCE")
@@ -645,9 +644,16 @@
#
fp = self.resource.fp
for name in fp.listdir():
- if name == db_basename: continue
- stream = fp.child(name).open()
+ if name == db_basename:
+ continue
+
try:
+ stream = fp.child(name).open()
+ except (IOError, OSError), e:
+ log.err("Unable to open resource %s: %s" % (name, e))
+ continue
+
+ try:
# FIXME: This is blocking I/O
try:
calendar = Component.fromStream(stream)
@@ -744,9 +750,16 @@
#
fp = self.resource.fp
for name in fp.listdir():
- if name == db_basename: continue
- stream = fp.child(name).open()
+ if name == db_basename:
+ continue
+
try:
+ stream = fp.child(name).open()
+ except (IOError, OSError), e:
+ log.err("Unable to open resource %s: %s" % (name, e))
+ continue
+
+ try:
# FIXME: This is blocking I/O
try:
calendar = Component.fromStream(stream)
Modified: CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/itip.py
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/itip.py 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/itip.py 2006-10-27 20:30:21 UTC (rev 325)
@@ -35,7 +35,6 @@
import datetime
import logging
import md5
-import os
import time
from twisted.python import log, failure
@@ -49,7 +48,6 @@
from twistedcaldav.method import report_common
from twistedcaldav.method.put_common import storeCalendarObjectResource
from twistedcaldav.resource import CalendarPrincipalCollectionResource, isCalendarCollectionResource
-from twistedcaldav.static import CalDAVFile
__version__ = "0.0"
Modified: CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/method/delete.py
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/method/delete.py 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/method/delete.py 2006-10-27 20:30:21 UTC (rev 325)
@@ -29,22 +29,28 @@
from twistedcaldav.resource import isPseudoCalendarCollectionResource
def http_DELETE(self, request):
+ #
# Override base DELETE request handling to ensure that the calendar
# index file has the entry for the deleted calendar component removed.
-
- # Do inherited default behaviour
- d = maybeDeferred(super(CalDAVFile, self).http_DELETE, request)
-
+ #
def deleteFromIndex(response):
response = IResponse(response)
if response.code == responsecode.NO_CONTENT:
+ def deleteFromParent(parent):
+ if isPseudoCalendarCollectionResource(parent):
+ index = parent.index()
+ index.deleteResource(self.fp.basename())
+
+ return response
+
# Remove index entry if we are a child of a calendar collection
- parent = self.locateParent(request, request.uri)
- if isPseudoCalendarCollectionResource(parent):
- index = parent.index()
- index.deleteResource(self.fp.basename())
+ d = self.locateParent(request, request.uri)
+ d.addCallback(deleteFromParent)
+ return d
return response
-
- return d.addCallback(deleteFromIndex)
+
+ d = maybeDeferred(super(CalDAVFile, self).http_DELETE, request)
+ d.addCallback(deleteFromIndex)
+ return d
Modified: CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/method/put_common.py
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/method/put_common.py 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/method/put_common.py 2006-10-27 20:30:21 UTC (rev 325)
@@ -71,7 +71,7 @@
@param sourceparent: the L{CalDAVFile} for the source resource's parent collection, or None if source is None.
@param destinationparent: the L{CalDAVFile} for the destination resource's parent collection.
@param deletesource: True if the source resource is to be deleted on successful completion, False otherwise.
- @param isiTIP: True if relaxed calendar data validation is to be done, False otehrwise.
+ @param isiTIP: True if relaxed calendar data validation is to be done, False otherwise.
@return: status response.
"""
@@ -268,16 +268,15 @@
rname = index.resourceNameForUID(uid)
# This can happen if two simulataneous PUTs occur with the same UID.
# i.e. one PUT has reserved the UID but has not yet written the resource,
- # the other PUT tries to reserve and fails but no index entry exists yets.
+ # the other PUT tries to reserve and fails but no index entry exists yet.
if rname is None:
rname = "<<Unknown Resource>>"
result = False
message = "Calendar resource %s already exists with same UID %s" % (rname, uid)
else:
- # Cannot overwrite different UID
- overwrite = destination.fp.exists()
- if overwrite:
+ # Cannot overwrite a resource with different UID
+ if destination.fp.exists():
olduid = index.resourceUIDForName(destination.fp.basename())
if olduid != uid:
rname = destination.fp.basename()
@@ -306,7 +305,7 @@
try:
calendar = Component.fromString(calendardata)
except ValueError, e:
- log.err(e)
+ log.err(str(e))
raise HTTPError(ErrorResponse(responsecode.FORBIDDEN, (caldav_namespace, "valid-calendar-data")))
# Valid calendar data check
Modified: CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/method/report_common.py
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/method/report_common.py 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/method/report_common.py 2006-10-27 20:30:21 UTC (rev 325)
@@ -38,7 +38,6 @@
from twisted.web2.dav.method.propfind import propertyName
from twisted.web2.dav.method.report import NumberOfMatchesWithinLimits
from twisted.web2.dav.method.report import max_number_of_matches
-from twisted.web2.dav.util import joinURL
from twistedcaldav import caldavxml
from twistedcaldav.caldavxml import caldav_namespace
Modified: CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/resource.py
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/resource.py 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/resource.py 2006-10-27 20:30:21 UTC (rev 325)
@@ -43,7 +43,7 @@
from twisted.web2.dav.resource import AccessDeniedError, DAVPrincipalResource
from twisted.web2.dav.davxml import dav_namespace
from twisted.web2.dav.http import ErrorResponse
-from twisted.web2.dav.resource import DAVResource, TwistedACLInheritable
+from twisted.web2.dav.resource import TwistedACLInheritable
from twisted.web2.dav.util import joinURL, parentForURL, unimplemented
from twisted.web2.dav.element.base import twisted_dav_namespace
from twisted.web2.http import HTTPError, RedirectResponse, StatusResponse, Response
@@ -57,6 +57,7 @@
from twistedcaldav.icaldav import ICalDAVResource, ICalendarPrincipalResource, ICalendarSchedulingCollectionResource
from twistedcaldav.caldavxml import caldav_namespace
from twistedcaldav.ical import Component as iComponent
+from twistedcaldav.extensions import DAVResource
if twistedcaldav.__version__:
serverVersion = twisted.web2.server.VERSION + " TwistedCalDAV/" + twistedcaldav.__version__
@@ -268,7 +269,7 @@
"""
# Cannot create collections inside a drop box
- return self.isSpecialCollection(customxml.DropBox)
+ return self.isPseudoCalendarCollection() or self.isSpecialCollection(customxml.DropBox)
def findCalendarCollections(self, depth, request, callback, privileges=None):
"""
Modified: CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/static.py 2006-10-27 19:50:14 UTC (rev 324)
+++ CalendarServer/branches/users/cdaboo/dropbox/twistedcaldav/static.py 2006-10-27 20:30:21 UTC (rev 325)
@@ -46,7 +46,6 @@
from twisted.web2.dav.idav import IDAVResource
from twisted.web2.dav.resource import TwistedACLInheritable
from twisted.web2.dav.resource import TwistedQuotaRootProperty
-from twisted.web2.dav.static import DAVFile
from twisted.web2.dav.util import parentForURL, joinURL, bindMethods
from twistedcaldav import caldavxml
@@ -57,6 +56,7 @@
from twistedcaldav.resource import CalDAVResource, isNonCalendarCollectionParentResource, CalendarPrincipalResource
from twistedcaldav.resource import ScheduleInboxResource, ScheduleOutboxResource, CalendarPrincipalCollectionResource
from twistedcaldav.resource import isCalendarCollectionResource
+from twistedcaldav.extensions import DAVFile
class CalDAVFile (CalDAVResource, DAVFile):
"""
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061027/b0b060cd/attachment.html
More information about the calendarserver-changes
mailing list