[Zope-Checkins] SVN: Zope/trunk/lib/python/webdav/NullResource.py
Collector 1626: Don't raise Forbidden if we don't know what
to do. Instead, riase Unauthorized if _verifyObjectPaste
fails in a way that we understand;
let all other exceptions bubble to the top.
Chris McDonough
chrism at plope.com
Thu Dec 16 23:53:33 EST 2004
Log message for revision 28642:
Collector 1626: Don't raise Forbidden if we don't know what to do. Instead, riase Unauthorized if _verifyObjectPaste fails in a way that we understand; let all other exceptions bubble to the top.
Changed:
U Zope/trunk/lib/python/webdav/NullResource.py
-=-
Modified: Zope/trunk/lib/python/webdav/NullResource.py
===================================================================
--- Zope/trunk/lib/python/webdav/NullResource.py 2004-12-16 21:48:58 UTC (rev 28641)
+++ Zope/trunk/lib/python/webdav/NullResource.py 2004-12-17 04:53:33 UTC (rev 28642)
@@ -27,6 +27,7 @@
from zExceptions import MethodNotAllowed
from common import isDavCollection
from common import Locked, Conflict, PreconditionFailed, UnsupportedMediaType
+from OFS.CopySupport import CopyError
class NullResource(Persistent, Acquisition.Implicit, Resource):
"""Null resources are used to handle HTTP method calls on
@@ -143,10 +144,8 @@
# check the clipboard.
try:
parent._verifyObjectPaste(ob.__of__(parent), 0)
- except Unauthorized:
- raise
- except:
- raise Forbidden, sys.exc_info()[1]
+ except CopyError:
+ raise Unauthorized, sys.exc_info()[1]
# Delegate actual PUT handling to the new object,
# SDS: But just *after* it has been stored.
More information about the Zope-Checkins
mailing list