[CalendarServer-changes] [457] CalendarServer/branches/users/wsanchez/provisioning/lib-patches/ Twisted/twisted.web2.dav.resource.patch

source_changes at macosforge.org source_changes at macosforge.org
Tue Nov 14 19:13:16 PST 2006


Revision: 457
          http://trac.macosforge.org/projects/calendarserver/changeset/457
Author:   wsanchez at apple.com
Date:     2006-11-14 19:13:15 -0800 (Tue, 14 Nov 2006)

Log Message:
-----------
Make defaultAccessControlList() useful again.

Modified Paths:
--------------
    CalendarServer/branches/users/wsanchez/provisioning/lib-patches/Twisted/twisted.web2.dav.resource.patch

Modified: CalendarServer/branches/users/wsanchez/provisioning/lib-patches/Twisted/twisted.web2.dav.resource.patch
===================================================================
--- CalendarServer/branches/users/wsanchez/provisioning/lib-patches/Twisted/twisted.web2.dav.resource.patch	2006-11-15 02:39:40 UTC (rev 456)
+++ CalendarServer/branches/users/wsanchez/provisioning/lib-patches/Twisted/twisted.web2.dav.resource.patch	2006-11-15 03:13:15 UTC (rev 457)
@@ -258,7 +258,7 @@
          else:
              return unauthenticatedPrincipal
  
-@@ -666,32 +735,27 @@
+@@ -666,33 +735,28 @@
          present on this resource, it tries to get it from the parent, unless it
          is the root or has no parent.
          """
@@ -305,11 +305,43 @@
 -
 -    principalCollections = deferredGenerator(principalCollections)
 -
-     def defaultAccessControlList(self):
+-    def defaultAccessControlList(self):
++    def defaultRootAccessControlList(self):
          """
          @return: the L{davxml.ACL} element containing the default access control
-@@ -1146,49 +1210,97 @@
+             list for this resource.
+@@ -704,6 +768,17 @@
+         #
+         return readonlyACL
  
++    def defaultAccessControlList(self):
++        """
++        @return: the L{davxml.ACL} element containing the default access control
++            list for this resource.
++        """
++        #
++        # The default behaviour is no ACL; we should inherrit from the parent
++        # collection.
++        #
++        return davxml.ACL()
++
+     def setAccessControlList(self, acl):
+         """
+         See L{IDAVResource.setAccessControlList}.
+@@ -1032,9 +1107,9 @@
+ 
+             if myURL == "/":
+                 # If we get to the root without any ACLs, then use the default.
++                acl = self.defaultRootAccessControlList()
++            else:
+                 acl = self.defaultAccessControlList()
+-            else:
+-                acl = davxml.ACL()
+ 
+         # Dynamically update privileges for those ace's that are inherited.
+         if inheritance:
+@@ -1146,49 +1221,97 @@
+ 
          This implementation returns an empty set.
          """
 -
@@ -428,7 +460,7 @@
      def samePrincipal(self, principal1, principal2):
          """
          Check whether the two prinicpals are exactly the same in terms of
-@@ -1511,6 +1623,265 @@
+@@ -1511,6 +1634,265 @@
          return None
  
      ##
@@ -694,7 +726,7 @@
      # HTTP
      ##
  
-@@ -1558,7 +1929,7 @@
+@@ -1558,7 +1940,7 @@
      """
      DAV resource with no children.
      """
@@ -703,7 +735,7 @@
          return succeed(None)
  
  class DAVPrincipalResource (DAVLeafResource):
-@@ -1712,6 +2083,37 @@
+@@ -1712,6 +2094,37 @@
  davxml.registerElement(TwistedACLInheritable)
  davxml.ACE.allowed_children[(twisted_dav_namespace, "inheritable")] = (0, 1)
  

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


More information about the calendarserver-changes mailing list