[Zope-Checkins] SVN: Zope/trunk/lib/python/OFS/PropertySheets.py - always look for WriteLockInterface *and* IWriteLock (the z3 version of the same interface)

Yvo Schubbe y.2005- at wcm-solutions.de
Tue Nov 1 08:40:23 EST 2005


Log message for revision 39808:
  - always look for WriteLockInterface *and* IWriteLock (the z3 version of the same interface)
  

Changed:
  U   Zope/trunk/lib/python/OFS/PropertySheets.py

-=-
Modified: Zope/trunk/lib/python/OFS/PropertySheets.py
===================================================================
--- Zope/trunk/lib/python/OFS/PropertySheets.py	2005-11-01 13:00:43 UTC (rev 39807)
+++ Zope/trunk/lib/python/OFS/PropertySheets.py	2005-11-01 13:40:22 UTC (rev 39808)
@@ -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 @@
             else: result[code].append(prop)
             return
 
-
     del propstat
     del propdesc
 
@@ -474,6 +474,7 @@
     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 @@
     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 @@
         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 @@
 
         return out
 
-
 Globals.default__class_init__(DAVProperties)
 
 
@@ -789,7 +790,6 @@
 Globals.default__class_init__(FixedSchema)
 
 
-
 class vps(Base):
     """Virtual Propertysheets
 



More information about the Zope-Checkins mailing list