[Zope3-checkins] CVS: Zope3/src/zope/app/security/grants - permissionroles.py:1.4 principalpermission.py:1.3 principalrole.py:1.2 rolepermission.py:1.3 securitymap.py:1.2

Steve Alexander steve@cat-box.net
Sat, 7 Jun 2003 01:46:35 -0400


Update of /cvs-repository/Zope3/src/zope/app/security/grants
In directory cvs.zope.org:/tmp/cvs-serv29577/src/zope/app/security/grants

Modified Files:
	permissionroles.py principalpermission.py principalrole.py 
	rolepermission.py securitymap.py 
Log Message:
more new-style implements declarations


=== Zope3/src/zope/app/security/grants/permissionroles.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/security/grants/permissionroles.py:1.3	Thu May  1 15:35:32 2003
+++ Zope3/src/zope/app/security/grants/permissionroles.py	Sat Jun  7 01:46:03 2003
@@ -20,10 +20,11 @@
 from zope.app.interfaces.security import IRolePermissionManager
 from zope.app.interfaces.security import IPermission
 from zope.app.security.settings import Unset
+from zope.interface import implements
 
 class PermissionRoles:
 
-    __implements__ = IPermission
+    implements(IPermission)
 
     def __init__(self, permission, context, roles):
         self._permission = permission


=== Zope3/src/zope/app/security/grants/principalpermission.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/security/grants/principalpermission.py:1.2	Wed May 28 11:46:10 2003
+++ Zope3/src/zope/app/security/grants/principalpermission.py	Sat Jun  7 01:46:03 2003
@@ -15,6 +15,7 @@
 
 from zope.component import getAdapter
 
+from zope.interface import implements
 from zope.app.interfaces.annotation import IAnnotations
 from zope.app.interfaces.security import IPrincipalPermissionManager
 
@@ -29,7 +30,7 @@
 class AnnotationPrincipalPermissionManager:
     """Mappings between principals and permissions."""
 
-    __implements__ = IPrincipalPermissionManager
+    implements(IPrincipalPermissionManager)
 
     def __init__(self, context):
         self._context = context
@@ -105,7 +106,7 @@
 class PrincipalPermissionManager(SecurityMap):
     """Mappings between principals and permissions."""
 
-    __implements__ = IPrincipalPermissionManager
+    implements(IPrincipalPermissionManager)
 
     def grantPermissionToPrincipal(self, permission_id, principal_id,
                                    check=True):
@@ -114,7 +115,7 @@
         if check:
             checkPermission(None, permission_id)
             checkPrincipal(None, principal_id)
-        
+
         self.addCell(permission_id, principal_id, Allow)
 
     def denyPermissionToPrincipal(self, permission_id, principal_id,


=== Zope3/src/zope/app/security/grants/principalrole.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/security/grants/principalrole.py:1.1	Thu Dec 26 13:49:07 2002
+++ Zope3/src/zope/app/security/grants/principalrole.py	Sat Jun  7 01:46:03 2003
@@ -14,6 +14,7 @@
 """Mappings between principals and roles, stored in an object locally."""
 
 from zope.component import getAdapter
+from zope.interface import implements
 
 from zope.app.interfaces.annotation import IAnnotations
 from zope.app.interfaces.security import IPrincipalRoleManager
@@ -31,7 +32,7 @@
 class AnnotationPrincipalRoleManager:
     """Mappings between principals and roles."""
 
-    __implements__ = IPrincipalRoleManager
+    implements(IPrincipalRoleManager)
 
     def __init__(self, context):
         self._context = context
@@ -99,7 +100,7 @@
 class PrincipalRoleManager(SecurityMap):
     """Mappings between principals and roles."""
 
-    __implements__ = (IPrincipalRoleManager, IPrincipalRoleMap)
+    implements(IPrincipalRoleManager, IPrincipalRoleMap)
 
     def assignRoleToPrincipal(self, role_id, principal_id, check=True):
         ''' See the interface IPrincipalRoleManager '''


=== Zope3/src/zope/app/security/grants/rolepermission.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/security/grants/rolepermission.py:1.2	Wed May 28 11:46:10 2003
+++ Zope3/src/zope/app/security/grants/rolepermission.py	Sat Jun  7 01:46:03 2003
@@ -16,6 +16,7 @@
 $Id$
 """
 from zope.component import getAdapter
+from zope.interface import implements
 
 from zope.app.interfaces.annotation import IAnnotations
 from zope.app.interfaces.security import IRolePermissionMap
@@ -35,7 +36,7 @@
     provide adapter that manages role permission data in an object attribute
     """
 
-    __implements__ = IRolePermissionManager, IRolePermissionMap
+    implements(IRolePermissionManager, IRolePermissionMap)
 
     def __init__(self, context):
         self._context = context
@@ -117,7 +118,7 @@
 
 class RolePermissions:
 
-    __implements__ = IRole
+    implements(IRole)
 
     def __init__(self, role, context, permissions):
         self._role = role
@@ -149,7 +150,7 @@
 class RolePermissionManager(SecurityMap):
     """Mappings between roles and permissions."""
 
-    __implements__ = IRolePermissionManager
+    implements(IRolePermissionManager)
 
     def grantPermissionToRole(self, permission_id, role_id, check=True):
         '''See interface IRolePermissionMap'''


=== Zope3/src/zope/app/security/grants/securitymap.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/security/grants/securitymap.py:1.1	Thu Dec 26 13:49:07 2002
+++ Zope3/src/zope/app/security/grants/securitymap.py	Sat Jun  7 01:46:03 2003
@@ -15,11 +15,12 @@
 
 from persistence import Persistent
 from persistence.dict import PersistentDict
+from zope.interface import implements
 from zope.app.interfaces.security.grants.securitymap import ISecurityMap
 
 class SecurityMap(object):
 
-    __implements__ = ISecurityMap
+    implements(ISecurityMap)
 
     def __init__(self):
         self._clear()
@@ -77,7 +78,7 @@
 
 class PersistentSecurityMap(SecurityMap, Persistent):
 
-    __implements__ = ISecurityMap
+    implements(ISecurityMap)
 
     def _clear(self):
         self._byrow = PersistentDict()