[Zope-Checkins] CVS: Zope3/lib/python/Zope/ComponentArchitecture - IServiceManager.py:1.1.2.1.8.1 __init__.py:1.1.6.21.8.3

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


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

Modified Files:
      Tag: Zope3InWonderland-branch
	IServiceManager.py __init__.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/ComponentArchitecture/IServiceManager.py 1.1.2.1 => 1.1.2.1.8.1 ===
 
     def getService(name):
-        """retrieve a service implementation
+        """Retrieve a service implementation
 
-        Default implimentations search the context for the next
-        ServiceService implimentation if the requested Service
-        is not found.
-        
-        If none is found anywhere, raises ComponentLookupError
+        Raises ComponentLookupError if the service can't be found.
         """


=== Zope3/lib/python/Zope/ComponentArchitecture/__init__.py 1.1.6.21.8.2 => 1.1.6.21.8.3 ===
 
 def getService(context, name):
-    #return getServiceManager(context).getService(name)
-    # XXX we shouldn't need to do this; the above should be sufficient
-    sv=getServiceManager(context).getService(name)
-    if getWrapperContainer(sv) is None:
-        return removeAllProxies(sv)
-    return sv
+    return getServiceManager(context).getService(name)
 
 def getServiceDefinitions(context): 
     return getServiceManager(context).getServiceDefinitions()