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 @@ ...@@ -15,6 +15,7 @@
$Id$ $Id$
""" """
import time, App.Management, Globals, sys import time, App.Management, Globals, sys
from webdav.interfaces import IWriteLock
from webdav.WriteLockInterface import WriteLockInterface from webdav.WriteLockInterface import WriteLockInterface
from ZPublisher.Converters import type_converters from ZPublisher.Converters import type_converters
from Globals import DTMLFile, MessageDialog from Globals import DTMLFile, MessageDialog
...@@ -391,7 +392,6 @@ class PropertySheet(Traversable, Persistent, Implicit): ...@@ -391,7 +392,6 @@ class PropertySheet(Traversable, Persistent, Implicit):
else: result[code].append(prop) else: result[code].append(prop)
return return
del propstat del propstat
del propdesc del propdesc
...@@ -474,6 +474,7 @@ class Virtual: ...@@ -474,6 +474,7 @@ class Virtual:
def v_self(self): def v_self(self):
return self.aq_parent.aq_parent return self.aq_parent.aq_parent
class DefaultProperties(Virtual, PropertySheet, View): class DefaultProperties(Virtual, PropertySheet, View):
"""The default property set mimics the behavior of old-style Zope """The default property set mimics the behavior of old-style Zope
properties -- it stores its property values in the instance of properties -- it stores its property values in the instance of
...@@ -567,7 +568,8 @@ class DAVProperties(Virtual, PropertySheet, View): ...@@ -567,7 +568,8 @@ class DAVProperties(Virtual, PropertySheet, View):
def dav__supportedlock(self): def dav__supportedlock(self):
vself = self.v_self() vself = self.v_self()
out = '\n' out = '\n'
if WriteLockInterface.isImplementedBy(vself): if IWriteLock.providedBy(vself) or \
WriteLockInterface.isImplementedBy(vself):
out += (' <n:lockentry>\n' out += (' <n:lockentry>\n'
' <d:lockscope><d:exclusive/></d:lockscope>\n' ' <d:lockscope><d:exclusive/></d:lockscope>\n'
' <d:locktype><d:write/></d:locktype>\n' ' <d:locktype><d:write/></d:locktype>\n'
...@@ -578,10 +580,10 @@ class DAVProperties(Virtual, PropertySheet, View): ...@@ -578,10 +580,10 @@ class DAVProperties(Virtual, PropertySheet, View):
security = getSecurityManager() security = getSecurityManager()
user = security.getUser().getId() user = security.getUser().getId()
vself = self.v_self() vself = self.v_self()
out = '\n' out = '\n'
if WriteLockInterface.isImplementedBy(vself): if IWriteLock.providedBy(vself) or \
WriteLockInterface.isImplementedBy(vself):
locks = vself.wl_lockValues(killinvalids=1) locks = vself.wl_lockValues(killinvalids=1)
for lock in locks: for lock in locks:
...@@ -595,7 +597,6 @@ class DAVProperties(Virtual, PropertySheet, View): ...@@ -595,7 +597,6 @@ class DAVProperties(Virtual, PropertySheet, View):
return out return out
Globals.default__class_init__(DAVProperties) Globals.default__class_init__(DAVProperties)
...@@ -789,7 +790,6 @@ class FixedSchema(PropertySheet): ...@@ -789,7 +790,6 @@ class FixedSchema(PropertySheet):
Globals.default__class_init__(FixedSchema) Globals.default__class_init__(FixedSchema)
class vps(Base): class vps(Base):
"""Virtual Propertysheets """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