[CMF-checkins] CVS: CMF/CMFCore - PortalContent.py:1.30
Andrew Sawyers
andrew@zope.com
Mon, 26 Nov 2001 14:00:49 -0500
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv25607/CMFCore
Modified Files:
PortalContent.py
Log Message:
*Fixed support for webDAV locking on Document. Added edit method
to handle TTW edits, while PUT calls _edit.
*Added editMetadata method for TTW edits to handle checks and
ensure TTW can't edit the metadata of a webDAV locked document.
*Made necessary skin changes to implement these new methods.
*Added failIfLocked method to PortalContent to handle the TTW
checks if a document has a webDAV lock.
=== CMF/CMFCore/PortalContent.py 1.29 => 1.30 ===
from DynamicType import DynamicType
from utils import getToolByName, _checkPermission, _getViewFor
+from webdav.Lockable import ResourceLockedError
try:
from webdav.WriteLockInterface import WriteLockInterface
NoWL = 0
@@ -141,6 +142,14 @@
'manage_FTPstat',
'manage_FTPget',
'manage_FTPlist',)
+
+ def failIfLocked(self):
+ """
+ Check if isLocked via webDav
+ """
+ if self.wl_isLocked():
+ raise ResourceLockedError, 'This resource is locked via webDAV'
+ return 0
# indexed methods
# ---------------