[Zope-Checkins] CVS: Zope/lib/python/OFS - PropertySheets.py:1.87.6.8

Sidnei da Silva sidnei at awkly.org
Wed Mar 31 10:58:36 EST 2004


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv6020/lib/python/OFS

Modified Files:
      Tag: Zope-2_6-branch
	PropertySheets.py 
Log Message:
Apply patch by Josh LaPlace. Makes DAV 'supportedlock' actually check if the object implements the WriteLockInterface.


=== Zope/lib/python/OFS/PropertySheets.py 1.87.6.7 => 1.87.6.8 ===
--- Zope/lib/python/OFS/PropertySheets.py:1.87.6.7	Tue Mar 30 15:06:59 2004
+++ Zope/lib/python/OFS/PropertySheets.py	Wed Mar 31 10:58:35 2004
@@ -565,10 +565,14 @@
         return ''
 
     def dav__supportedlock(self):
-        return '\n  <n:lockentry>\n' \
-               '  <d:lockscope><d:exclusive/></d:lockscope>\n' \
-               '  <d:locktype><d:write/></d:locktype>\n' \
-               '  </n:lockentry>\n  '
+        vself = self.v_self()
+        out = '\n'
+        if WriteLockInterface.isImplementedBy(vself):
+            out += ('  <n:lockentry>\n'
+                    '  <d:lockscope><d:exclusive/></d:lockscope>\n'
+                    '  <d:locktype><d:write/></d:locktype>\n'
+                    '  </n:lockentry>\n  ')
+        return out
 
     def dav__lockdiscovery(self):
         security = getSecurityManager()




More information about the Zope-Checkins mailing list