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

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


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

Modified Files:
      Tag: Zope-2_6-branch
	PageTemplateFile.py 
Log Message:
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.20.2.1 => 1.20.2.2 ===
--- Zope/lib/python/Products/PageTemplates/PageTemplateFile.py:1.20.2.1	Wed Sep 18 10:54:11 2002
+++ Zope/lib/python/Products/PageTemplates/PageTemplateFile.py	Mon Oct 14 18:33:57 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 "