Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
041d9b1b
Commit
041d9b1b
authored
Dec 14, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge fixes to MOVE and COPY
parent
95cb54a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
lib/python/webdav/Resource.py
lib/python/webdav/Resource.py
+9
-7
No files found.
lib/python/webdav/Resource.py
View file @
041d9b1b
...
...
@@ -85,7 +85,7 @@
"""WebDAV support - resource objects."""
__version__
=
'$Revision: 1.3
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
7
$'
[
11
:
-
2
]
import
sys
,
os
,
string
,
mimetypes
,
davcmds
,
ExtensionClass
from
common
import
absattr
,
aq_base
,
urlfix
,
rfc1123_date
...
...
@@ -137,7 +137,10 @@ class Resource(ExtensionClass.Base):
except
:
method
=
None
if
method
is
not
None
:
try
:
return
getSecurityManager
().
validateValue
(
method
)
try
:
return
getSecurityManager
().
validate
(
None
,
object
,
methodname
,
method
)
except
:
pass
raise
'Unauthorized'
,
msg
...
...
@@ -296,8 +299,6 @@ class Resource(ExtensionClass.Base):
self
.
dav__validate
(
object
,
'DELETE'
,
REQUEST
)
parent
.
_delObject
(
name
)
parent
.
_setObject
(
name
,
ob
)
#ob=ob.__of__(parent)
#ob._postCopy(parent, op=0)
RESPONSE
.
setStatus
(
existing
and
204
or
201
)
if
not
existing
:
RESPONSE
.
setHeader
(
'Location'
,
dest
)
...
...
@@ -338,8 +339,11 @@ class Resource(ExtensionClass.Base):
if
existing
and
flag
==
'F'
:
raise
'Precondition Failed'
,
'Resource %s exists.'
%
dest
try
:
parent
.
_checkId
(
name
,
allow_dup
=
1
)
except
:
raise
'Forbidden'
,
sys
.
exc_info
()[
1
]
except
:
raise
'Forbidden'
,
sys
.
exc_info
()[
1
]
try
:
parent
.
_verifyObjectPaste
(
self
)
except
'Unauthorized'
:
raise
'Unauthorized'
,
sys
.
exc_info
()[
1
]
except
:
raise
'Forbidden'
,
sys
.
exc_info
()[
1
]
ob
=
aq_base
(
self
.
_getCopy
(
parent
))
...
...
@@ -350,8 +354,6 @@ class Resource(ExtensionClass.Base):
self
.
dav__validate
(
object
,
'DELETE'
,
REQUEST
)
parent
.
_delObject
(
name
)
parent
.
_setObject
(
name
,
ob
)
#ob=ob.__of__(parent)
#ob._postCopy(parent, op=1)
RESPONSE
.
setStatus
(
existing
and
204
or
201
)
if
not
existing
:
RESPONSE
.
setHeader
(
'Location'
,
dest
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment