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
6cd47cb2
Commit
6cd47cb2
authored
Dec 07, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged c118751, c118752 from 2.13 branch
parent
29023caf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
15 deletions
+22
-15
doc/CHANGES.rst
doc/CHANGES.rst
+2
-0
src/App/DavLockManager.py
src/App/DavLockManager.py
+20
-15
No files found.
doc/CHANGES.rst
View file @
6cd47cb2
...
...
@@ -11,6 +11,8 @@ http://docs.zope.org/zope2/releases/.
Bugs Fixed
++++++++++
- LP 686664: WebDAV Lock Manager ZMI view wasn't accessible.
- Fixed argument parsing for entrypoint based zopectl commands.
- Fixed the usage of ``pstats.Stats()`` output stream. The
...
...
src/App/DavLockManager.py
View file @
6cd47cb2
...
...
@@ -13,13 +13,13 @@
from
AccessControl.class_init
import
InitializeClass
from
AccessControl.SecurityInfo
import
ClassSecurityInfo
from
AccessControl.SecurityManagement
import
getSecurityManager
from
Acquisition
import
aq_base
from
Acquisition
import
Implicit
from
App.special_dtml
import
DTMLFile
from
OFS.SimpleItem
import
Item
from
webdav.Lockable
import
wl_isLocked
class
DavLockManager
(
Item
,
Implicit
):
id
=
'DavLockManager'
name
=
title
=
'WebDAV Lock Manager'
...
...
@@ -35,19 +35,18 @@ class DavLockManager(Item, Implicit):
manage_davlocks
=
manage_main
=
manage
=
DTMLFile
(
'dtml/davLockManager'
,
globals
())
manage_davlocks
.
_setName
(
'manage_davlocks'
)
manage_options
=
(
{
'label'
:
'Write Locks'
,
'action'
:
'manage_main'
}
)
manage_options
=
({
'label'
:
'Write Locks'
,
'action'
:
'manage_main'
},
)
def
findLockedObjects
(
self
,
frompath
=
''
):
app
=
self
.
getPhysicalRoot
()
if
frompath
:
if
frompath
[
0
]
==
'/'
:
frompath
=
frompath
[
1
:]
if
frompath
[
0
]
==
'/'
:
frompath
=
frompath
[
1
:]
# since the above will turn '/' into an empty string, check
# for truth before chopping a final slash
if
frompath
and
frompath
[
-
1
]
==
'/'
:
frompath
=
frompath
[:
-
1
]
if
frompath
and
frompath
[
-
1
]
==
'/'
:
frompath
=
frompath
[:
-
1
]
# Now we traverse to the node specified in the 'frompath' if
# the user chose to filter the search, and run a ZopeFind with
...
...
@@ -66,7 +65,8 @@ class DavLockManager(Item, Implicit):
def
manage_unlockObjects
(
self
,
paths
=
[],
REQUEST
=
None
):
" Management screen action to unlock objects. "
if
paths
:
self
.
unlockObjects
(
paths
)
if
paths
:
self
.
unlockObjects
(
paths
)
if
REQUEST
is
not
None
:
m
=
'%s objects unlocked.'
%
len
(
paths
)
return
self
.
manage_davlocks
(
self
,
REQUEST
,
manage_tabs_message
=
m
)
...
...
@@ -80,13 +80,17 @@ class DavLockManager(Item, Implicit):
base
=
aq_base
(
obj
)
if
not
hasattr
(
base
,
'objectItems'
):
return
result
try
:
items
=
obj
.
objectItems
()
except
:
return
result
try
:
items
=
obj
.
objectItems
()
except
Exception
:
return
result
addresult
=
result
.
append
for
id
,
ob
in
items
:
if
path
:
p
=
'%s/%s'
%
(
path
,
id
)
else
:
p
=
id
if
path
:
p
=
'%s/%s'
%
(
path
,
id
)
else
:
p
=
id
dflag
=
hasattr
(
ob
,
'_p_changed'
)
and
(
ob
.
_p_changed
==
None
)
bs
=
aq_base
(
ob
)
...
...
@@ -94,13 +98,14 @@ class DavLockManager(Item, Implicit):
li
=
[]
addlockinfo
=
li
.
append
for
token
,
lock
in
ob
.
wl_lockItems
():
addlockinfo
({
'owner'
:
lock
.
getCreatorPath
(),
'token'
:
token
})
addlockinfo
({
'owner'
:
lock
.
getCreatorPath
(),
'token'
:
token
})
addresult
((
p
,
li
))
dflag
=
0
if
hasattr
(
bs
,
'objectItems'
):
self
.
_findapply
(
ob
,
result
,
p
)
if
dflag
:
ob
.
_p_deactivate
()
if
dflag
:
ob
.
_p_deactivate
()
return
result
...
...
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