[Zope-Checkins] CVS: Zope/lib/python/Products/PageTemplates - PageTemplateFile.py:1.22

Shane Hathaway shane@cvs.zope.org
Mon, 14 Oct 2002 18:36:26 -0400


Update of /cvs-repository/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv5861/lib/python/Products/PageTemplates

Modified Files:
	PageTemplateFile.py 
Log Message:
Merge from 2_6 branch.

PageTemplateFiles were previously owned by whatever object contained
them.  This resulted in very hard bugs if the user who owned the
container was removed.  Since PageTemplateFiles come from the
filesystem, they are now "unowned", similar to DTMLFiles.  Security is
still applied, but now it is applied correctly.



=== Zope/lib/python/Products/PageTemplates/PageTemplateFile.py 1.21 => 1.22 ===
--- Zope/lib/python/Products/PageTemplates/PageTemplateFile.py:1.21	Wed Sep 18 11:12:46 2002
+++ Zope/lib/python/Products/PageTemplates/PageTemplateFile.py	Mon Oct 14 18:36:26 2002
@@ -139,6 +139,15 @@
 
     __roles__ = ComputedAttribute(_get__roles__, 1)
 
+    def getOwner(self, info=0):
+        """Gets the owner of the executable object.
+
+        This method is required of all objects that go into
+        the security context stack.  Since this object came from the
+        filesystem, it is owned by no one managed by Zope.
+        """
+        return None
+
     def __getstate__(self):
         from ZODB.POSException import StorageError
         raise StorageError, ("Instance of AntiPersistent class %s "