[Zope3-checkins] CVS: Zope3/src/zope/app/component - hooks.py:1.5.8.4
Steve Alexander
steve@cat-box.net
Wed, 14 May 2003 10:14:47 -0400
Update of /cvs-repository/Zope3/src/zope/app/component
In directory cvs.zope.org:/tmp/cvs-serv3223/src/zope/app/component
Modified Files:
Tag: stevea-decorators-branch
hooks.py
Log Message:
Implemented interface combining for the decorator.
=== Zope3/src/zope/app/component/hooks.py 1.5.8.3 => 1.5.8.4 ===
--- Zope3/src/zope/app/component/hooks.py:1.5.8.3 Wed May 14 09:54:11 2003
+++ Zope3/src/zope/app/component/hooks.py Wed May 14 10:14:16 2003
@@ -27,6 +27,7 @@
from zope.security.proxy import Proxy, getChecker, getObject
from zope.proxy.context.decorator import Decorator
from zope.security.checker import DecoratedChecker
+from zope.interface import providedBy, InterfaceSpecification
def getServiceManager_hook(context, local=False):
"""Get a service manager based on context.
@@ -104,6 +105,10 @@
checker = DecoratedChecker(checker, spec.permissionMap,
spec.setPermissionMap)
attrdict['__Security_checker__'] = checker
+
+ if spec.mixinInterfaceSpec is not None:
+ attrdict['__providedBy__'] = InterfaceSpecification(
+ spec.mixinInterfaceSpec, providedBy(unproxied_ob))
d = Decorator(unproxied_ob, parent, spec.mixinFactory, spec.names,
attrdict, inner, **kw)