[Zope3-checkins] CVS: Zope3/src/zope/app/securitypolicy -
permissionroles.py:1.2 rolepermission.py:1.2 roleregistry.py:NONE
Stephan Richter
srichter at cosmos.phy.tufts.edu
Fri Mar 5 13:39:38 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/securitypolicy
In directory cvs.zope.org:/tmp/cvs-serv11332/src/zope/app/securitypolicy
Modified Files:
permissionroles.py rolepermission.py
Removed Files:
roleregistry.py
Log Message:
Make all the security code use role utilities and the new fields instead of
the methods.
=== Zope3/src/zope/app/securitypolicy/permissionroles.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/securitypolicy/permissionroles.py:1.1 Fri Feb 27 07:46:31 2004
+++ Zope3/src/zope/app/securitypolicy/permissionroles.py Fri Mar 5 13:39:07 2004
@@ -50,4 +50,4 @@
for role, setting in proles:
settings[role] = setting.getName()
nosetting = Unset.getName()
- return [settings.get(role.getId(), nosetting) for role in self._roles]
+ return [settings.get(role.id, nosetting) for role in self._roles]
=== Zope3/src/zope/app/securitypolicy/rolepermission.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/securitypolicy/rolepermission.py:1.1 Fri Feb 27 07:46:31 2004
+++ Zope3/src/zope/app/securitypolicy/rolepermission.py Fri Mar 5 13:39:07 2004
@@ -14,9 +14,9 @@
"""
$Id$
"""
-from zope.component import getAdapter
from zope.interface import implements
+from zope.app import zapi
from zope.app.interfaces.annotation import IAnnotations
from zope.app.security.settings import Allow, Deny, Unset
@@ -109,7 +109,7 @@
# getting RolePermissions.
from zope.proxy import removeAllProxies
context = removeAllProxies(self._context)
- annotations = getAdapter(context, IAnnotations)
+ annotations = zapi.getAdapter(context, IAnnotations)
try:
return annotations[annotation_key]
except KeyError:
@@ -128,17 +128,17 @@
self._permissions = permissions
def getId(self):
- return self._role.getId()
+ return self._role.id
def getTitle(self):
- return self._role.getTitle()
+ return self._role.title
def getDescription(self):
- return self._role.getDescription()
+ return self._role.description
def permissionsInfo(self):
- prm = getAdapter(self._context, IRolePermissionManager)
- rperms = prm.getPermissionsForRole(self._role.getId())
+ prm = zapi.getAdapter(self._context, IRolePermissionManager)
+ rperms = prm.getPermissionsForRole(self._role.id)
settings = {}
for permission, setting in rperms:
settings[permission] = setting.getName()
=== Removed File Zope3/src/zope/app/securitypolicy/roleregistry.py ===
More information about the Zope3-Checkins
mailing list