Commit 181ff9ce authored by 's avatar

- always look for WriteLockInterface *and* IWriteLock (the z3 version of the same interface)

parent 384b4342
......@@ -15,6 +15,7 @@
$Id$
"""
import time, App.Management, Globals, sys
from webdav.interfaces import IWriteLock
from webdav.WriteLockInterface import WriteLockInterface
from ZPublisher.Converters import type_converters
from Globals import DTMLFile, MessageDialog
......@@ -391,7 +392,6 @@ class PropertySheet(Traversable, Persistent, Implicit):
else: result[code].append(prop)
return
del propstat
del propdesc
......@@ -474,6 +474,7 @@ class Virtual:
def v_self(self):
return self.aq_parent.aq_parent
class DefaultProperties(Virtual, PropertySheet, View):
"""The default property set mimics the behavior of old-style Zope
properties -- it stores its property values in the instance of
......@@ -567,7 +568,8 @@ class DAVProperties(Virtual, PropertySheet, View):
def dav__supportedlock(self):
vself = self.v_self()
out = '\n'
if WriteLockInterface.isImplementedBy(vself):
if IWriteLock.providedBy(vself) or \
WriteLockInterface.isImplementedBy(vself):
out += (' <n:lockentry>\n'
' <d:lockscope><d:exclusive/></d:lockscope>\n'
' <d:locktype><d:write/></d:locktype>\n'
......@@ -578,10 +580,10 @@ class DAVProperties(Virtual, PropertySheet, View):
security = getSecurityManager()
user = security.getUser().getId()
vself = self.v_self()
out = '\n'
if WriteLockInterface.isImplementedBy(vself):
if IWriteLock.providedBy(vself) or \
WriteLockInterface.isImplementedBy(vself):
locks = vself.wl_lockValues(killinvalids=1)
for lock in locks:
......@@ -595,7 +597,6 @@ class DAVProperties(Virtual, PropertySheet, View):
return out
Globals.default__class_init__(DAVProperties)
......@@ -789,7 +790,6 @@ class FixedSchema(PropertySheet):
Globals.default__class_init__(FixedSchema)
class vps(Base):
"""Virtual Propertysheets
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment