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
187c8887
Commit
187c8887
authored
24 years ago
by
Jeffrey Shell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some locknull resource behavior problems when unlocking via the DavLockManager
parent
a95a6b45
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
lib/python/App/DavLockManager.py
lib/python/App/DavLockManager.py
+2
-2
lib/python/webdav/Lockable.py
lib/python/webdav/Lockable.py
+2
-0
lib/python/webdav/NullResource.py
lib/python/webdav/NullResource.py
+5
-3
No files found.
lib/python/App/DavLockManager.py
View file @
187c8887
...
...
@@ -75,10 +75,10 @@ class DavLockManager(OFS.SimpleItem.Item, OFS.FindSupport.FindSupport,
dflag
=
hasattr
(
ob
,
'_p_changed'
)
and
(
ob
.
_p_changed
==
None
)
bs
=
Acquisition
.
aq_base
(
ob
)
if
wl_isLocked
(
bs
):
if
wl_isLocked
(
ob
):
li
=
[]
addlockinfo
=
li
.
append
for
token
,
lock
in
bs
.
wl_lockItems
():
for
token
,
lock
in
ob
.
wl_lockItems
():
addlockinfo
({
'owner'
:
lock
.
getCreatorPath
(),
'token'
:
token
})
addresult
(
p
,
li
)
...
...
This diff is collapsed.
Click to expand it.
lib/python/webdav/Lockable.py
View file @
187c8887
...
...
@@ -97,6 +97,8 @@ class LockableItem(EtagSupport):
# destroy all locks.
locks
=
self
.
wl_lockmapping
()
locks
.
clear
()
if
hasattr
(
Acquisition
.
aq_base
(
self
),
'__no_valid_write_locks__'
):
self
.
__no_valid_write_locks__
()
import
Globals
...
...
This diff is collapsed.
Click to expand it.
lib/python/webdav/NullResource.py
View file @
187c8887
...
...
@@ -85,7 +85,7 @@
"""WebDAV support - null resource objects."""
__version__
=
'$Revision: 1.2
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
6
$'
[
11
:
-
2
]
import
sys
,
os
,
string
,
mimetypes
,
Globals
,
davcmds
import
Acquisition
,
OFS
.
content_types
...
...
@@ -101,6 +101,7 @@ class NullResource(Persistent, Acquisition.Implicit, Resource):
"""Null resources are used to handle HTTP method calls on
objects which do not yet exist in the url namespace."""
__implements__
=
(
WriteLockInterface
,)
__null_resource__
=
1
__ac_permissions__
=
(
...
...
@@ -269,6 +270,7 @@ class LockNullResource(NullResource, OFS.SimpleItem.Item_w__name__):
MKCOL deletes the LockNull resource from its container and replaces it
with the target object. An UNLOCK deletes it. """
__implements__
=
(
WriteLockInterface
,)
__locknull_resource__
=
1
meta_type
=
'WebDAV LockNull Resource'
...
...
@@ -290,8 +292,8 @@ class LockNullResource(NullResource, OFS.SimpleItem.Item_w__name__):
# A special hook (for better or worse) called when there are no
# valid locks left. We have to delete ourselves from our container
# now.
parent
=
self
.
aq_parent
parent
.
_delObject
(
self
.
id
)
parent
=
Acquisition
.
aq_parent
(
self
)
if
parent
:
parent
.
_delObject
(
self
.
id
)
def
__init__
(
self
,
name
):
self
.
id
=
self
.
__name__
=
name
...
...
This diff is collapsed.
Click to expand it.
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