[CalendarServer-changes] [323] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Oct 27 12:49:54 PDT 2006
Revision: 323
http://trac.macosforge.org/projects/calendarserver/changeset/323
Author: wsanchez at apple.com
Date: 2006-10-27 12:49:54 -0700 (Fri, 27 Oct 2006)
Log Message:
-----------
Merge branches/users/wsanchez/acl-2
Modified Paths:
--------------
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.__init__.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.davxml.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.element.__init__.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.element.base.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.idav.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.__init__.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.copymove.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.delete.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.put.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.resource.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.static.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.test.test_prop.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.xattrprops.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.log.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.server.patch
CalendarServer/trunk/run
CalendarServer/trunk/twistedcaldav/method/put_common.py
Added Paths:
-----------
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.iweb.patch
Removed Paths:
-------------
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.proppatch.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.report_principal_match.patch
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.report_principal_property_search.patch
Modified: CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.__init__.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.__init__.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.__init__.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.dav.davxml.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.davxml.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.davxml.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.dav.element.__init__.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.element.__init__.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.element.__init__.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.dav.element.base.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.element.base.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.element.base.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.dav.idav.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.idav.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.idav.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.dav.method.__init__.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.__init__.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.__init__.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.dav.method.copymove.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.copymove.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.copymove.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -1,17 +1,8 @@
Index: twisted/web2/dav/method/copymove.py
===================================================================
---- twisted/web2/dav/method/copymove.py (revision 18479)
+--- twisted/web2/dav/method/copymove.py (revision 18545)
+++ twisted/web2/dav/method/copymove.py (working copy)
-@@ -29,8 +29,6 @@
-
- __all__ = ["http_COPY", "http_MOVE"]
-
--import urlparse
--
- from twisted.python import log
- from twisted.internet.defer import waitForDeferred, deferredGenerator
- from twisted.web2 import responsecode
-@@ -38,7 +36,7 @@
+@@ -38,7 +38,7 @@
from twisted.web2.filter.location import addLocation
from twisted.web2.dav import davxml
from twisted.web2.dav.idav import IDAVResource
@@ -20,7 +11,7 @@
from twisted.web2.dav.util import parentForURL
# FIXME: This is circular
-@@ -81,7 +79,15 @@
+@@ -81,7 +81,15 @@
# May need to add a location header
addLocation(request, destination_uri)
@@ -37,7 +28,7 @@
yield x
yield x.getResult()
-@@ -144,7 +150,14 @@
+@@ -144,7 +152,14 @@
log.err(msg)
raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, msg))
Modified: CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.delete.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.delete.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.delete.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -1,58 +0,0 @@
-Index: twisted/web2/dav/method/propfind.py
-===================================================================
---- twisted/web2/dav/method/propfind.py (revision 18479)
-+++ 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()
-@@ -117,15 +121,15 @@
- if self.isCollection() and not uri.endswith("/"):
- uri += "/"
-
-- try:
-- resource_properties = waitForDeferred(resource.listProperties(request))
-- yield resource_properties
-- resource_properties = resource_properties.getResult()
-- except:
-- log.err("Unable to get properties for resource %r" % (resource,))
-- raise
-+ if search_properties is "names":
-+ try:
-+ resource_properties = waitForDeferred(resource.listProperties(request))
-+ yield resource_properties
-+ resource_properties = resource_properties.getResult()
-+ except:
-+ log.err("Unable to get properties for resource %r" % (resource,))
-+ raise
-
-- if search_properties is "names":
- properties_by_status = {
- responsecode.OK: [propertyName(p) for p in resource_properties]
- }
-@@ -143,7 +147,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/trunk/lib-patches/Twisted/twisted.web2.dav.method.proppatch.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.proppatch.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.proppatch.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.dav.method.put.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.put.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.put.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.dav.method.report_principal_match.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.report_principal_match.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.report_principal_match.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.dav.method.report_principal_property_search.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.report_principal_property_search.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.report_principal_property_search.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.dav.resource.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.resource.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.resource.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/resource.py
===================================================================
---- twisted/web2/dav/resource.py (revision 18479)
+--- 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):
-@@ -286,7 +296,33 @@
+@@ -286,6 +296,32 @@
d.addCallback(gotACL)
return d
return ifAllowed((davxml.ReadACL(),), callback)
@@ -43,7 +43,7 @@
+ d = self.quota(request)
+ d.addCallback(callback)
+ return d
-
++
+ if name == "quota-used-bytes":
+ def callback(qvalue):
+ if qvalue is None:
@@ -56,11 +56,10 @@
+ d = self.quota(request)
+ d.addCallback(callback)
+ return d
-+
+
elif namespace == twisted_dav_namespace:
if name == "resource-class":
- class ResourceClass (davxml.WebDAVTextElement):
-@@ -366,12 +402,26 @@
+@@ -366,6 +402,18 @@
# FIXME: A set would be better here, that that's a python 2.4+ feature.
qnames = list(self.liveProperties)
@@ -79,33 +78,17 @@
for qname in self.deadProperties().list():
if (qname not in qnames) and (qname[0] != twisted_private_namespace):
qnames.append(qname)
+@@ -370,7 +418,9 @@
+ if (qname not in qnames) and (qname[0] != twisted_private_namespace):
+ qnames.append(qname)
- return succeed(qnames)
+ yield qnames
-
-+ listProperties = deferredGenerator(listProperties)
+
++ listProperties = deferredGenerator(listProperties)
+
def listAllprop(self, request):
"""
- Some DAV properties should not be returned to a C{DAV:allprop} query.
-@@ -488,7 +538,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}.
-
-@@ -512,7 +562,7 @@
- if privileges is None:
- return child
-
-- d = child.checkPrivileges(request, privileges)
-+ d = child.checkPrivileges(request, privileges, inherited_aces=inherited_aces)
- d.addCallback(lambda _: child)
- return d
-
@@ -535,7 +585,7 @@
completionDeferred.callback(None)
else:
@@ -115,75 +98,7 @@
child.addCallback(checkPrivileges)
child.addCallbacks(gotChild, checkPrivilegesError, (childpath,))
child.addErrback(completionDeferred.errback)
-@@ -544,6 +594,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}.
-@@ -918,10 +1005,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))
-@@ -1018,7 +1106,6 @@
- url = request.urlForResource(self)
-
- assert url is not None, "urlForResource(self) returned None for resource %s" % (self,)
--
- return url
-
- try:
-@@ -1515,6 +1602,265 @@
+@@ -1511,6 +1561,265 @@
return None
##
@@ -449,7 +364,7 @@
# HTTP
##
-@@ -1562,7 +1908,7 @@
+@@ -1558,7 +1867,7 @@
"""
DAV resource with no children.
"""
@@ -458,16 +373,7 @@
return succeed(None)
class DAVPrincipalResource (DAVLeafResource):
-@@ -1588,7 +1934,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):
-@@ -1716,6 +2062,37 @@
+@@ -1712,6 +2021,37 @@
davxml.registerElement(TwistedACLInheritable)
davxml.ACE.allowed_children[(twisted_dav_namespace, "inheritable")] = (0, 1)
Modified: CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.static.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.static.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.static.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -1,6 +1,6 @@
Index: twisted/web2/dav/static.py
===================================================================
---- twisted/web2/dav/static.py (revision 18479)
+--- twisted/web2/dav/static.py (revision 18545)
+++ twisted/web2/dav/static.py (working copy)
@@ -28,16 +28,16 @@
@@ -96,24 +96,3 @@
# Workarounds for issues with File
##
-@@ -157,11 +206,17 @@
- # Render from the index file
- standin = self.createSimilarFile(ifp.path)
- else:
-+ filtered_aces = waitForDeferred(self.inheritedACEsforChildren(request))
-+ yield filtered_aces
-+ filtered_aces = filtered_aces.getResult()
-+
- children = []
-
-- d = self.findChildren("1", request,
-- lambda r,u: children.append(os.path.basename(u)),
-- (davxml.Read(),))
-+ def found(request, uri):
-+ children.append(uri.split("/")[-1].rstrip("/"))
-+
-+ d = self.findChildren("1", request, found, (davxml.Read(),),
-+ inherited_aces=filtered_aces)
- d = waitForDeferred(d)
- yield d
- d = d.getResult()
Modified: CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.test.test_prop.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.test.test_prop.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.test.test_prop.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -1,19 +1,17 @@
Index: twisted/web2/dav/test/test_prop.py
===================================================================
---- twisted/web2/dav/test/test_prop.py (revision 18479)
+--- twisted/web2/dav/test/test_prop.py (revision 18545)
+++ twisted/web2/dav/test/test_prop.py (working copy)
-@@ -21,10 +21,8 @@
+@@ -21,6 +21,8 @@
#
# DRI: Wilfredo Sanchez, wsanchez at apple.com
##
--
++from twisted.web2.dav.element.rfc4331 import QuotaUsedBytes
++from twisted.web2.dav.element.rfc4331 import QuotaAvailableBytes
+
import random
--from twisted.trial.unittest import SkipTest
- from twisted.web2 import responsecode
- from twisted.web2.iweb import IResponse
- from twisted.web2.stream import MemoryStream
-@@ -37,13 +35,14 @@
+@@ -37,7 +39,14 @@
from twisted.web2.dav.test.util import serialize
import twisted.web2.dav.test.util
@@ -23,14 +21,9 @@
+ (dav_namespace, "quota-available-bytes" ),
+ (dav_namespace, "quota-used-bytes" ),
+)
-
--#
--# See whether dead properties are available
--#
--from twisted.web2.dav.noneprops import NonePropertyStore
--from twisted.web2.dav.static import DeadPropertyStore
++
+live_properties = [lookupElement(qname)() for qname in DAVResource.liveProperties if (qname[0] == dav_namespace) and qname not in dynamicLiveProperties]
+print live_properties
- class PROP(twisted.web2.dav.test.util.TestCase):
- """
+ #
+ # See whether dead properties are available
Modified: CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.xattrprops.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.xattrprops.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.xattrprops.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.iweb.patch (from rev 322, CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.iweb.patch)
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.iweb.patch (rev 0)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.iweb.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.log.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.log.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.log.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/lib-patches/Twisted/twisted.web2.server.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.server.patch 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.server.patch 2006-10-27 19:49:54 UTC (rev 323)
@@ -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/trunk/run
===================================================================
--- CalendarServer/trunk/run 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/run 2006-10-27 19:49:54 UTC (rev 323)
@@ -442,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/trunk/twistedcaldav/method/put_common.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/put_common.py 2006-10-27 19:44:09 UTC (rev 322)
+++ CalendarServer/trunk/twistedcaldav/method/put_common.py 2006-10-27 19:49:54 UTC (rev 323)
@@ -305,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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061027/0b904691/attachment.html
More information about the calendarserver-changes
mailing list