[CalendarServer-changes] [316] CalendarServer/branches/users/wsanchez/acl-2

source_changes at macosforge.org source_changes at macosforge.org
Thu Oct 26 17:09:08 PDT 2006


Revision: 316
          http://trac.macosforge.org/projects/calendarserver/changeset/316
Author:   wsanchez at apple.com
Date:     2006-10-26 17:09:08 -0700 (Thu, 26 Oct 2006)

Log Message:
-----------
Move to dav-acl-1608-2 version 18545

Modified Paths:
--------------
    CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.resource.patch
    CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.static.patch
    CalendarServer/branches/users/wsanchez/acl-2/run

Removed Paths:
-------------
    CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch
    CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.proppatch.patch
    CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.report_principal_match.patch
    CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.report_principal_property_search.patch

Deleted: CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch
===================================================================
--- CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch	2006-10-27 00:08:33 UTC (rev 315)
+++ CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch	2006-10-27 00:09:08 UTC (rev 316)
@@ -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/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.proppatch.patch
===================================================================
--- CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.proppatch.patch	2006-10-27 00:08:33 UTC (rev 315)
+++ CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.proppatch.patch	2006-10-27 00:09:08 UTC (rev 316)
@@ -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)

Deleted: CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.report_principal_match.patch
===================================================================
--- CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.report_principal_match.patch	2006-10-27 00:08:33 UTC (rev 315)
+++ CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.report_principal_match.patch	2006-10-27 00:09:08 UTC (rev 316)
@@ -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/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.report_principal_property_search.patch
===================================================================
--- CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.report_principal_property_search.patch	2006-10-27 00:08:33 UTC (rev 315)
+++ CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.method.report_principal_property_search.patch	2006-10-27 00:09:08 UTC (rev 316)
@@ -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/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.resource.patch
===================================================================
--- CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.resource.patch	2006-10-27 00:08:33 UTC (rev 315)
+++ CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.resource.patch	2006-10-27 00:09:08 UTC (rev 316)
@@ -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
@@ -88,24 +88,6 @@
      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:
@@ -159,23 +141,7 @@
      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 @@
+@@ -1014,7 +1101,6 @@
              url = request.urlForResource(self)
  
              assert url is not None, "urlForResource(self) returned None for resource %s" % (self,)
@@ -183,7 +149,7 @@
              return url
  
          try:
-@@ -1515,6 +1602,265 @@
+@@ -1511,6 +1597,265 @@
          return None
  
      ##
@@ -449,7 +415,7 @@
      # HTTP
      ##
  
-@@ -1562,7 +1908,7 @@
+@@ -1558,7 +1903,7 @@
      """
      DAV resource with no children.
      """
@@ -458,16 +424,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 +2057,37 @@
  davxml.registerElement(TwistedACLInheritable)
  davxml.ACE.allowed_children[(twisted_dav_namespace, "inheritable")] = (0, 1)
  

Modified: CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.static.patch
===================================================================
--- CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.static.patch	2006-10-27 00:08:33 UTC (rev 315)
+++ CalendarServer/branches/users/wsanchez/acl-2/lib-patches/Twisted/twisted.web2.dav.static.patch	2006-10-27 00:09:08 UTC (rev 316)
@@ -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/branches/users/wsanchez/acl-2/run
===================================================================
--- CalendarServer/branches/users/wsanchez/acl-2/run	2006-10-27 00:08:33 UTC (rev 315)
+++ CalendarServer/branches/users/wsanchez/acl-2/run	2006-10-27 00:09:08 UTC (rev 316)
@@ -416,8 +416,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}";
  

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


More information about the calendarserver-changes mailing list