[Zope3-checkins] CVS: Zope3/src/zope/security/examples - sandbox.py:1.4 sandbox_security.py:1.6
Steve Alexander
steve@cat-box.net
Wed, 4 Jun 2003 05:10:18 -0400
Update of /cvs-repository/Zope3/src/zope/security/examples
In directory cvs.zope.org:/tmp/cvs-serv26591/src/zope/security/examples
Modified Files:
sandbox.py sandbox_security.py
Log Message:
new style implements()
=== Zope3/src/zope/security/examples/sandbox.py 1.3 => 1.4 ===
--- Zope3/src/zope/security/examples/sandbox.py:1.3 Fri Apr 25 15:28:43 2003
+++ Zope3/src/zope/security/examples/sandbox.py Wed Jun 4 05:09:47 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.6 ===
--- 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 Wed Jun 4 05:09:47 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()