[Zope-Checkins] CVS: Zope3/lib/python/Zope/Security - Checker.py:1.1.4.5.4.5

Jim Fulton jim@zope.com
Tue, 4 Jun 2002 12:43:19 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Security
In directory cvs.zope.org:/tmp/cvs-serv7653/lib/python/Zope/Security

Modified Files:
      Tag: Zope3InWonderland-branch
	Checker.py 
Log Message:
Added permission attribute for service directives. This lets you set
security within the service directive itself.

Added a __Security_checker__ attribute, checked by the ProxyFactory
that specifies a checker to be used for proxies. This allows us to
record the permission requirements on a component without actually
creating a proxy. If this attribute can't be set, we'll go ahead and
create the proxy anyway.




=== Zope3/lib/python/Zope/Security/Checker.py 1.1.4.5.4.4 => 1.1.4.5.4.5 ===
     
     if checker is None:        
+        checker = getattr(object, '__Security_checker__', None)
+    
+    if checker is None:        
+
         checker = selectChecker(object)
         if checker is None:
             return object