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
2938714a
Commit
2938714a
authored
May 01, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deleting objects is now handled through manage_delObjects()
(Collector #2196)
parent
64c8b915
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
10 deletions
+20
-10
lib/python/webdav/Collection.py
lib/python/webdav/Collection.py
+12
-7
lib/python/webdav/Resource.py
lib/python/webdav/Resource.py
+8
-3
No files found.
lib/python/webdav/Collection.py
View file @
2938714a
...
...
@@ -85,7 +85,7 @@
"""WebDAV support - collection objects."""
__version__
=
'$Revision: 1.
19
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
20
$'
[
11
:
-
2
]
import
sys
,
os
,
string
,
Globals
,
davcmds
,
Lockable
,
re
from
common
import
urlfix
,
rfc1123_date
...
...
@@ -154,10 +154,10 @@ class Collection(Resource):
user
=
getSecurityManager
().
getUser
()
token
=
None
if
re
.
match
(
"/Control_Panel"
,
REQUEST
[
'PATH_INFO'
]):
RESPONSE
.
setStatus
(
403
)
RESPONSE
.
setHeader
(
'Content-Type'
,
'text/xml; charset="utf-8"'
)
return
RESPONSE
#
if re.match("/Control_Panel",REQUEST['PATH_INFO']):
#
RESPONSE.setStatus(403)
#
RESPONSE.setHeader('Content-Type', 'text/xml; charset="utf-8"')
#
return RESPONSE
# Level 1 of lock checking (is the collection or its parent locked?)
if
Lockable
.
wl_isLocked
(
self
):
...
...
@@ -190,8 +190,13 @@ class Collection(Resource):
RESPONSE
.
setBody
(
result
)
else
:
# There were no conflicts, so we can go ahead and delete
self
.
aq_parent
.
_delObject
(
name
)
RESPONSE
.
setStatus
(
204
)
# ajung: additional check if we really could delete the collection
# (Collector #2196)
if
parent
.
manage_delObjects
([
name
],
REQUEST
=
None
)
is
None
:
RESPONSE
.
setStatus
(
204
)
else
:
RESPONSE
.
setStatus
(
403
)
return
RESPONSE
...
...
lib/python/webdav/Resource.py
View file @
2938714a
...
...
@@ -85,7 +85,7 @@
"""WebDAV support - resource objects."""
__version__
=
'$Revision: 1.4
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.4
4
$'
[
11
:
-
2
]
import
sys
,
os
,
string
,
mimetypes
,
davcmds
,
ExtensionClass
,
Lockable
from
common
import
absattr
,
aq_base
,
urlfix
,
rfc1123_date
,
tokenFinder
,
urlbase
...
...
@@ -294,8 +294,13 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
'condition was passed in.'
# Either we're not locked, or a succesful lock token was submitted
# so we can delete the lock now.
self
.
aq_parent
.
_delObject
(
name
)
RESPONSE
.
setStatus
(
204
)
# ajung: Fix for Collector # 2196
if
parent
.
manage_delObjects
([
name
],
REQUEST
=
None
)
is
None
:
RESPONSE
.
setStatus
(
204
)
else
:
RESPONSE
.
setStatus
(
403
)
return
RESPONSE
def
PROPFIND
(
self
,
REQUEST
,
RESPONSE
):
...
...
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