[CalendarServer-changes] [541] CalendarServer/branches/users/wsanchez/provisioning-2

source_changes at macosforge.org source_changes at macosforge.org
Tue Nov 21 12:04:25 PST 2006


Revision: 541
          http://trac.macosforge.org/projects/calendarserver/changeset/541
Author:   cdaboo at apple.com
Date:     2006-11-21 12:04:24 -0800 (Tue, 21 Nov 2006)

Log Message:
-----------
Use more default privileges.

Modified Paths:
--------------
    CalendarServer/branches/users/wsanchez/provisioning-2/conf/repository.xml
    CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/directory/resource.py
    CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/static.py

Modified: CalendarServer/branches/users/wsanchez/provisioning-2/conf/repository.xml
===================================================================
--- CalendarServer/branches/users/wsanchez/provisioning-2/conf/repository.xml	2006-11-21 18:42:41 UTC (rev 540)
+++ CalendarServer/branches/users/wsanchez/provisioning-2/conf/repository.xml	2006-11-21 20:04:24 UTC (rev 541)
@@ -40,28 +40,12 @@
       <members>
         <collection name="principals">
           <pytype>twistedcaldav.directory.resource.DirectoryPrincipalProvisioningResource</pytype>
-          <properties>
-            <acl>
-              <ace>
-                <principal><authenticated/></principal>
-                <grant><privilege><read/></privilege></grant>
-				<inheritable/>
-              </ace>
-            </acl>
-          </properties>
+          <properties/>
           <members/>
         </collection>
         <collection name="calendars">
           <pytype>twistedcaldav.static.CalendarHomeProvisioningFile</pytype>
-          <properties>
-            <acl>
-              <ace>
-                <principal><authenticated/></principal>
-                <grant><privilege><read/></privilege></grant>
-                <protected/>
-              </ace>
-            </acl>
-          </properties>
+          <properties/>
           <members/>
         </collection>
       </members>

Modified: CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/directory/resource.py
===================================================================
--- CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/directory/resource.py	2006-11-21 18:42:41 UTC (rev 540)
+++ CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/directory/resource.py	2006-11-21 20:04:24 UTC (rev 541)
@@ -109,7 +109,6 @@
                 davxml.Principal(davxml.Authenticated()),
                 davxml.Grant(davxml.Privilege(davxml.Read())),
                 davxml.Protected(),
-                TwistedACLInheritable()
             ),
         )
 
@@ -162,6 +161,20 @@
     def principalForUser(self, user):
         return self._parent.principalForUser(user)
 
+    ##
+    # ACL
+    ##
+
+    def defaultAccessControlList(self):
+        return davxml.ACL(
+            # Read access for authenticated users.
+            davxml.ACE(
+                davxml.Principal(davxml.Authenticated()),
+                davxml.Grant(davxml.Privilege(davxml.Read())),
+                davxml.Protected(),
+            ),
+        )
+
 class DirectoryPrincipalResource (ReadOnlyResourceMixIn, CalendarPrincipalFile):
     """
     Directory principal resource.

Modified: CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/static.py	2006-11-21 18:42:41 UTC (rev 540)
+++ CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/static.py	2006-11-21 20:04:24 UTC (rev 541)
@@ -753,6 +753,15 @@
     def groupMemberships(self):
         return ()
 
+    def defaultAccessControlList(self):
+        return davxml.ACL(
+            # Read access for this principal only.
+            davxml.ACE(
+                davxml.Principal(davxml.HRef(self.principalURL())),
+                davxml.Grant(davxml.Privilege(davxml.Read())),
+                davxml.Protected(),
+            ),
+        )
     ##
     # CalDAV
     ##

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


More information about the calendarserver-changes mailing list