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

source_changes at macosforge.org source_changes at macosforge.org
Tue Nov 28 17:46:55 PST 2006


Revision: 616
          http://trac.macosforge.org/projects/calendarserver/changeset/616
Author:   wsanchez at apple.com
Date:     2006-11-28 17:46:54 -0800 (Tue, 28 Nov 2006)

Log Message:
-----------
Fix a bug in matchPrincipals() which was matching DAV:all into DAV:authenticated.

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

Modified: CalendarServer/branches/users/wsanchez/provisioning-2/lib-patches/Twisted/twisted.web2.dav.resource.patch
===================================================================
--- CalendarServer/branches/users/wsanchez/provisioning-2/lib-patches/Twisted/twisted.web2.dav.resource.patch	2006-11-28 19:31:26 UTC (rev 615)
+++ CalendarServer/branches/users/wsanchez/provisioning-2/lib-patches/Twisted/twisted.web2.dav.resource.patch	2006-11-29 01:46:54 UTC (rev 616)
@@ -467,7 +467,33 @@
      def samePrincipal(self, principal1, principal2):
          """
          Check whether the two prinicpals are exactly the same in terms of
-@@ -1511,6 +1633,265 @@
+@@ -1213,7 +1335,6 @@
+             return False
+                 
+     def matchPrincipal(self, principal1, principal2, request):
+-
+         """
+         Check whether the principal1 is a principal in the set defined by
+         principal2.
+@@ -1238,6 +1359,9 @@
+             if isinstance(principal1, davxml.Unauthenticated):
+                 yield False
+                 return
++            elif isinstance(principal1, davxml.All):
++                yield False
++                return
+             else:
+                 yield True
+                 return
+@@ -1265,7 +1389,6 @@
+ 
+         assert principal2 is not None, "principal2 is None"
+ 
+-
+         # Compare two HRefs and do group membership test as well
+         if principal1 == principal2:
+             yield True
+@@ -1511,6 +1634,265 @@
          return None
  
      ##
@@ -733,7 +759,7 @@
      # HTTP
      ##
  
-@@ -1558,7 +1939,7 @@
+@@ -1558,7 +1940,7 @@
      """
      DAV resource with no children.
      """
@@ -742,7 +768,7 @@
          return succeed(None)
  
  class DAVPrincipalResource (DAVLeafResource):
-@@ -1712,6 +2093,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/20061128/fbeb8712/attachment.html


More information about the calendarserver-changes mailing list