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
cf6774c8
Commit
cf6774c8
authored
Feb 02, 2003
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Locked objects can not be CUT
- Pasted objects are copied without WebDAV locks
parent
652d9ccb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
lib/python/OFS/CopySupport.py
lib/python/OFS/CopySupport.py
+7
-1
No files found.
lib/python/OFS/CopySupport.py
View file @
cf6774c8
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
##############################################################################
##############################################################################
__doc__
=
"""Copy interface"""
__doc__
=
"""Copy interface"""
__version__
=
'$Revision: 1.8
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.8
4
$'
[
11
:
-
2
]
import
sys
,
Globals
,
Moniker
,
tempfile
,
ExtensionClass
import
sys
,
Globals
,
Moniker
,
tempfile
,
ExtensionClass
from
marshal
import
loads
,
dumps
from
marshal
import
loads
,
dumps
...
@@ -22,6 +22,7 @@ from AccessControl import getSecurityManager
...
@@ -22,6 +22,7 @@ from AccessControl import getSecurityManager
from
Acquisition
import
aq_base
,
aq_inner
,
aq_parent
from
Acquisition
import
aq_base
,
aq_inner
,
aq_parent
from
zExceptions
import
Unauthorized
from
zExceptions
import
Unauthorized
from
AccessControl
import
getSecurityManager
from
AccessControl
import
getSecurityManager
from
webdav.Lockable
import
ResourceLockedError
CopyError
=
'Copy Error'
CopyError
=
'Copy Error'
...
@@ -65,6 +66,10 @@ class CopyContainer(ExtensionClass.Base):
...
@@ -65,6 +66,10 @@ class CopyContainer(ExtensionClass.Base):
oblist
=
[]
oblist
=
[]
for
id
in
ids
:
for
id
in
ids
:
ob
=
self
.
_getOb
(
id
)
ob
=
self
.
_getOb
(
id
)
if
ob
.
wl_isLocked
():
raise
ResourceLockedError
,
'Object "%s" is locked via WebDAV'
%
ob
.
getId
()
if
not
ob
.
cb_isMoveable
():
if
not
ob
.
cb_isMoveable
():
raise
CopyError
,
eNotSupported
%
id
raise
CopyError
,
eNotSupported
%
id
m
=
Moniker
.
Moniker
(
ob
)
m
=
Moniker
.
Moniker
(
ob
)
...
@@ -164,6 +169,7 @@ class CopyContainer(ExtensionClass.Base):
...
@@ -164,6 +169,7 @@ class CopyContainer(ExtensionClass.Base):
self
.
_setObject
(
id
,
ob
)
self
.
_setObject
(
id
,
ob
)
ob
=
self
.
_getOb
(
id
)
ob
=
self
.
_getOb
(
id
)
ob
.
manage_afterClone
(
ob
)
ob
.
manage_afterClone
(
ob
)
ob
.
wl_clearLocks
()
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
,
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
,
...
...
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