[Zope3-checkins] CVS: Zope3/src/zope/security/examples - sandbox_security.py:1.9.2.1

Marius Gedminas marius at pov.lt
Mon Feb 23 14:18:38 EST 2004


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

Modified Files:
      Tag: mgedmin-events2-branch
	sandbox_security.py 
Log Message:
Added interaction to security proxies.  Added interaction arguments to security
checkers.  Added a lot of XXX comments in places where proxies are created but
no interaction is (yet) available.

Added an initial draft of IInteraction to zope.security.interfaces.  This might
move to zope.interaction.interfaces as suggested by Steve.

Fixed a buglet in CheckerLoggingMixin: check_getattr delegated the check to
super(...).check instead of super(...).check_getattr.  Added full unit tests
for CheckerLoggingMixin.



=== Zope3/src/zope/security/examples/sandbox_security.py 1.9 => 1.9.2.1 ===
--- Zope3/src/zope/security/examples/sandbox_security.py:1.9	Fri Feb 20 15:39:07 2004
+++ Zope3/src/zope/security/examples/sandbox_security.py	Mon Feb 23 14:18:07 2004
@@ -151,7 +151,7 @@
            and sandbox.IAgent.isImplementedBy(agent):
             self._agents[agent.getId()]=agent
             agentChecker = checker.selectChecker(self)
-            wrapped_home = agentChecker.proxy(self)
+            wrapped_home = agentChecker.proxy(self, None) # XXX interaction
             agent.setHome(wrapped_home)
         else:
             raise sandbox.SandboxError("couldn't add agent %s" %agent)
@@ -170,7 +170,7 @@
         possible_homes = _homes.keys()
         possible_homes.remove(agent.getHome().getId())
         new_home =  _homes.get(whrandom.choice(possible_homes))
-        return checker.selectChecker(new_home).proxy(new_home)
+        return checker.selectChecker(new_home).proxy(new_home, None) # XXX interaction
 
     sandbox.GreenerPastures = GreenerPastures
 




More information about the Zope3-Checkins mailing list