[CalendarServer-changes] [2017] CalendarServer/branches/release/CalendarServer-1.1-dev/twistedcaldav /method

source_changes at macosforge.org source_changes at macosforge.org
Thu Nov 15 11:48:54 PST 2007


Revision: 2017
          http://trac.macosforge.org/projects/calendarserver/changeset/2017
Author:   wsanchez at apple.com
Date:     2007-11-15 11:48:52 -0800 (Thu, 15 Nov 2007)

Log Message:
-----------
Pulled up r2013 r2012 from trunk.

Modified Paths:
--------------
    CalendarServer/branches/release/CalendarServer-1.1-dev/twistedcaldav/method/copymove.py
    CalendarServer/branches/release/CalendarServer-1.1-dev/twistedcaldav/method/report_multiget.py

Modified: CalendarServer/branches/release/CalendarServer-1.1-dev/twistedcaldav/method/copymove.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-1.1-dev/twistedcaldav/method/copymove.py	2007-11-15 19:43:16 UTC (rev 2016)
+++ CalendarServer/branches/release/CalendarServer-1.1-dev/twistedcaldav/method/copymove.py	2007-11-15 19:48:52 UTC (rev 2017)
@@ -94,7 +94,7 @@
     if self.isCollection():
         log.err("Attempt to copy a collection into a calendar collection")
         raise HTTPError(StatusResponse(
-            responsecode.NOT_ALLOWED,
+            responsecode.FORBIDDEN,
             "Cannot create collection within special collection %s" % (destination,))
         )
 
@@ -171,14 +171,14 @@
     if destinationcal:
         # Checks for copying a calendar collection
         if self.isCalendarCollection():
-            log.err("Attempt to copy a calendar collection into another calendar collection %s" % destination)
+            log.err("Attempt to move a calendar collection into another calendar collection %s" % destination)
             raise HTTPError(ErrorResponse(responsecode.FORBIDDEN, (caldav_namespace, "calendar-collection-location-ok")))
     
         # We also do not allow regular collections in calendar collections
         if self.isCollection():
-            log.err("Attempt to copy a collection into a calendar collection")
+            log.err("Attempt to move a collection into a calendar collection")
             raise HTTPError(StatusResponse(
-                responsecode.NOT_ALLOWED,
+                responsecode.FORBIDDEN,
                 "Cannot create collection within special collection %s" % (destination,)
             ))
 

Modified: CalendarServer/branches/release/CalendarServer-1.1-dev/twistedcaldav/method/report_multiget.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-1.1-dev/twistedcaldav/method/report_multiget.py	2007-11-15 19:43:16 UTC (rev 2016)
+++ CalendarServer/branches/release/CalendarServer-1.1-dev/twistedcaldav/method/report_multiget.py	2007-11-15 19:48:52 UTC (rev 2017)
@@ -146,7 +146,7 @@
             for name in valid_names:
                 if name not in exists_names:
                     href = davxml.HRef.fromString(joinURL(request.uri, name))
-                    responses.append(davxml.StatusResponse(href, davxml.Status.fromResponseCode(responsecode.NOT_ALLOWED)))
+                    responses.append(davxml.StatusResponse(href, davxml.Status.fromResponseCode(responsecode.FORBIDDEN)))
                 else:
                     checked_names.append(name)
             if not checked_names:
@@ -177,7 +177,7 @@
     
             # Indicate error for all valid non-readable resources
             for ignore_resource, href in bad_resources:
-                responses.append(davxml.StatusResponse(davxml.HRef.fromString(href), davxml.Status.fromResponseCode(responsecode.NOT_ALLOWED)))
+                responses.append(davxml.StatusResponse(davxml.HRef.fromString(href), davxml.Status.fromResponseCode(responsecode.FORBIDDEN)))
     
         doCalendarResponse = deferredGenerator(doCalendarResponse)
 
@@ -214,7 +214,7 @@
                     parent = parent.getResult()
     
                     if not parent.isCalendarCollection() or not parent.index().resourceExists(name):
-                        responses.append(davxml.StatusResponse(href, davxml.Status.fromResponseCode(responsecode.NOT_ALLOWED)))
+                        responses.append(davxml.StatusResponse(href, davxml.Status.fromResponseCode(responsecode.FORBIDDEN)))
                         continue
                     
                     # Check privileges on parent - must have at least DAV:read
@@ -223,7 +223,7 @@
                         yield d
                         d.getResult()
                     except AccessDeniedError:
-                        responses.append(davxml.StatusResponse(href, davxml.Status.fromResponseCode(responsecode.NOT_ALLOWED)))
+                        responses.append(davxml.StatusResponse(href, davxml.Status.fromResponseCode(responsecode.FORBIDDEN)))
                         continue
                     
                     # Cache the last parent's inherited aces for checkPrivileges optimization
@@ -247,7 +247,7 @@
                     parent = parent.getResult()
     
                     if not parent.isPseudoCalendarCollection() or not parent.index().resourceExists(name):
-                        responses.append(davxml.StatusResponse(href, davxml.Status.fromResponseCode(responsecode.NOT_ALLOWED)))
+                        responses.append(davxml.StatusResponse(href, davxml.Status.fromResponseCode(responsecode.FORBIDDEN)))
                         continue
                     child = self
             
@@ -263,7 +263,7 @@
                     yield d
                     d.getResult()
                 except AccessDeniedError:
-                    responses.append(davxml.StatusResponse(href, davxml.Status.fromResponseCode(responsecode.NOT_ALLOWED)))
+                    responses.append(davxml.StatusResponse(href, davxml.Status.fromResponseCode(responsecode.FORBIDDEN)))
                     continue
         
                 d = waitForDeferred(report_common.responseForHref(request, responses, href, child, None, propertiesForResource, propertyreq))

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20071115/65d6fe06/attachment.html


More information about the calendarserver-changes mailing list