[Zope3-checkins] CVS: Zope3/src/zope/app/component - hooks.py:1.5.8.3

Steve Alexander steve@cat-box.net
Wed, 14 May 2003 09:54:42 -0400


Update of /cvs-repository/Zope3/src/zope/app/component
In directory cvs.zope.org:/tmp/cvs-serv32758/src/zope/app/component

Modified Files:
      Tag: stevea-decorators-branch
	hooks.py 
Log Message:
Wrote tests for ProxyFactory (there were none), and made its semantics
clearer.
Implemented more decorator factory functionality.


=== Zope3/src/zope/app/component/hooks.py 1.5.8.2 => 1.5.8.3 ===
--- Zope3/src/zope/app/component/hooks.py:1.5.8.2	Wed May 14 06:39:04 2003
+++ Zope3/src/zope/app/component/hooks.py	Wed May 14 09:54:11 2003
@@ -98,12 +98,16 @@
         inner = None
     else:
         inner = ob
-    d = Decorator(unproxied_ob, parent, spec.mixinFactory, spec.names, {},
-                  inner, **kw)
+    attrdict = {}
     if checker is not None:
         if spec.permissionMap or spec.setPermissionMap:
             checker = DecoratedChecker(checker, spec.permissionMap,
                                        spec.setPermissionMap)
+            attrdict['__Security_checker__'] = checker
+
+    d = Decorator(unproxied_ob, parent, spec.mixinFactory, spec.names,
+                  attrdict, inner, **kw)
+    if checker is not None:
         d = Proxy(d, checker)
     return d