Commit 97c934ec authored by 's avatar

fixed security assertions for copy and move

parent 845509c8
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
"""WebDAV support - resource objects.""" """WebDAV support - resource objects."""
__version__='$Revision: 1.39 $'[11:-2] __version__='$Revision: 1.40 $'[11:-2]
import sys, os, string, mimetypes, davcmds, ExtensionClass, Lockable import sys, os, string, mimetypes, davcmds, ExtensionClass, Lockable
from common import absattr, aq_base, urlfix, rfc1123_date, tokenFinder, urlbase from common import absattr, aq_base, urlfix, rfc1123_date, tokenFinder, urlbase
...@@ -328,6 +328,7 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem): ...@@ -328,6 +328,7 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
self.dav__init(REQUEST, RESPONSE) self.dav__init(REQUEST, RESPONSE)
raise 'Method Not Allowed', 'The resource already exists.' raise 'Method Not Allowed', 'The resource already exists.'
COPY__roles__=('Anonymous',)
def COPY(self, REQUEST, RESPONSE): def COPY(self, REQUEST, RESPONSE):
"""Create a duplicate of the source resource whose state """Create a duplicate of the source resource whose state
and behavior match that of the source resource as closely and behavior match that of the source resource as closely
...@@ -411,6 +412,7 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem): ...@@ -411,6 +412,7 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
RESPONSE.setBody('') RESPONSE.setBody('')
return RESPONSE return RESPONSE
MOVE__roles__=('Anonymous',)
def MOVE(self, REQUEST, RESPONSE): def MOVE(self, REQUEST, RESPONSE):
"""Move a resource to a new location. Though we may later try to """Move a resource to a new location. Though we may later try to
make a move appear seamless across namespaces (e.g. from Zope make a move appear seamless across namespaces (e.g. from Zope
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment