[Zope3-checkins] CVS: Zope3/src/zope/security - proxy.py:1.5

Jim Fulton jim@zope.com
Tue, 20 May 2003 16:28:50 -0400


Update of /cvs-repository/Zope3/src/zope/security
In directory cvs.zope.org:/tmp/cvs-serv30974/src/zope/security

Modified Files:
	proxy.py 
Log Message:
Added a doc string documenting the mysterious
trustedRemoveSecurityProxy.



=== Zope3/src/zope/security/proxy.py 1.4 => 1.5 ===
--- Zope3/src/zope/security/proxy.py:1.4	Thu Dec 26 13:42:47 2002
+++ Zope3/src/zope/security/proxy.py	Tue May 20 16:28:50 2003
@@ -24,6 +24,15 @@
 from zope.security.checker import ProxyFactory
 
 def trustedRemoveSecurityProxy(object):
+    """Remove a security proxy if the proxy's checker came from a trusted source.
+
+    The rational is that it's OK to do this since the caller is
+    trusted and the proxy can always be recreated by callingt the
+    proxy factory and getting back a proxy with the same checker.
+
+    XXX More thought needs to be given to assuring this contact.
+    
+    """
     if ((type(object) is Proxy) and
         isinstance(getChecker(object), _trustedChecker)
         ):