[CalendarServer-changes] [4918] ContactsServer/twistedcaldav/method

source_changes at macosforge.org source_changes at macosforge.org
Mon Jan 11 14:15:57 PST 2010


Revision: 4918
          http://trac.macosforge.org/projects/calendarserver/changeset/4918
Author:   gaya at apple.com
Date:     2010-01-11 14:15:54 -0800 (Mon, 11 Jan 2010)
Log Message:
-----------
fix MKCOL

Modified Paths:
--------------
    ContactsServer/twistedcaldav/method/mkcol.py
    ContactsServer/twistedcaldav/method/report_common.py

Modified: ContactsServer/twistedcaldav/method/mkcol.py
===================================================================
--- ContactsServer/twistedcaldav/method/mkcol.py	2010-01-11 20:49:17 UTC (rev 4917)
+++ ContactsServer/twistedcaldav/method/mkcol.py	2010-01-11 22:15:54 UTC (rev 4918)
@@ -1,5 +1,5 @@
 ##
-# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
+# Copyright (c) 2005-2010 Apple Inc. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -177,6 +177,6 @@
     
     else:
         # No request body so it is a standard MKCOL
-        result = super(CalDAVFile, self).http_MKCOL(request)
+        result = yield super(CalDAVFile, self).http_MKCOL(request)
         returnValue(result)
 

Modified: ContactsServer/twistedcaldav/method/report_common.py
===================================================================
--- ContactsServer/twistedcaldav/method/report_common.py	2010-01-11 20:49:17 UTC (rev 4917)
+++ ContactsServer/twistedcaldav/method/report_common.py	2010-01-11 22:15:54 UTC (rev 4918)
@@ -1,5 +1,5 @@
 ##
-# Copyright (c) 2006-2009 Apple Inc. All rights reserved.
+# Copyright (c) 2006-2010 Apple Inc. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
 
 __all__ = [
     "applyToCalendarCollections",
+    "applyToAddressBookCollections",
     "responseForHref",
     "allPropertiesForResource",
     "propertyNamesForResource",
@@ -116,10 +117,12 @@
     """
 
     # First check the privilege on this resource
-    try:
-        yield resource.checkPrivileges(request, privileges)
-    except AccessDeniedError:
-        returnValue( None )
+    if privileges:
+        try:
+            print ("DeleteResource.applyToAddressBookCollections(1.5)")
+            yield resource.checkPrivileges(request, privileges)
+        except AccessDeniedError:
+            returnValue( None )
 
     # When scanning we only go down as far as an address book collection - not into one
     if resource.isAddressBookCollection():
@@ -128,7 +131,7 @@
         resources = [(resource, request_uri)]
     else:
         resources = []
-        yield resource.findAddressBookCollections(depth, request, lambda x, y: resources.append((x, y)), privileges = privileges)
+        yield resource.findCalendarCollections(depth, request, lambda x, y: resources.append((x, y)), privileges = privileges)
          
     for addrresource, uri in resources:
         yield apply(addrresource, uri)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100111/3cf3f326/attachment.html>


More information about the calendarserver-changes mailing list