[Zope3-checkins] CVS: Zope3/src/zope/security/examples - sandbox.py:1.3.12.1 sandbox_security.py:1.5.12.1

Grégoire Weber zope@i-con.ch
Sun, 22 Jun 2003 10:24:26 -0400


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

Modified Files:
      Tag: cw-mail-branch
	sandbox.py sandbox_security.py 
Log Message:
Synced up with HEAD

=== Zope3/src/zope/security/examples/sandbox.py 1.3 => 1.3.12.1 ===
--- Zope3/src/zope/security/examples/sandbox.py:1.3	Fri Apr 25 15:28:43 2003
+++ Zope3/src/zope/security/examples/sandbox.py	Sun Jun 22 10:23:54 2003
@@ -13,7 +13,7 @@
 ##############################################################################
 import time, whrandom
 
-from zope.interface import Interface
+from zope.interface import Interface, implements
 
 class IAgent(Interface):
     """
@@ -70,7 +70,7 @@
     """
     see IAgent doc
     """
-    __implements__ = IAgent
+    implements(IAgent)
 
     def __init__(self, id, home, auth_token, action):
         self.id = id
@@ -96,7 +96,7 @@
     """
     see ISandbox doc
     """
-    __implements__ = ISandbox
+    implements(ISandbox)
 
     def __init__(self, id, service_factories):
         self.id = id
@@ -147,7 +147,7 @@
                                )
 
 class Service:
-    __implements__ = IService
+    implements(IService)
     def getId(self):
         return self.__class__.__name__
     def setHome(self, home):


=== Zope3/src/zope/security/examples/sandbox_security.py 1.5 => 1.5.12.1 ===
--- Zope3/src/zope/security/examples/sandbox_security.py:1.5	Fri Apr 25 15:28:43 2003
+++ Zope3/src/zope/security/examples/sandbox_security.py	Sun Jun 22 10:23:54 2003
@@ -14,6 +14,7 @@
 import sandbox
 from zope.security.interfaces import ISecurityPolicy, IChecker
 from zope.security import management, checker
+from zope.interface import implements
 
 #################################
 # 1. map permissions to actions
@@ -73,7 +74,7 @@
 
 class SimulationSecurityPolicy:
 
-    __implements__ = ISecurityPolicy
+    implements(ISecurityPolicy)
 
     def checkPermission(self, permission, object, context):
         token = context.user.getAuthenticationToken()