[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - AttributePrincipalRoleManager.py:1.1.2.2 IPrincipalRoleMap.py:1.1.2.4 PrincipalRoleManager.py:1.1.2.5
Nick Garcia
ngarcia@codeit.com
Sat, 9 Feb 2002 17:19:21 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv8008/lib/python/Zope/App/Security
Modified Files:
Tag: Zope-3x-branch
AttributePrincipalRoleManager.py IPrincipalRoleMap.py
PrincipalRoleManager.py
Log Message:
Added getPrincipalsAndRoles() to AttributePrincipalRoleManager and PrincipalRoleManager as well as the IPrincipalRoleMap interface, plus unit tests.
=== Zope3/lib/python/Zope/App/Security/AttributePrincipalRoleManager.py 1.1.2.1 => 1.1.2.2 ===
return Unset
+ def getPrincipalsAndRoles( self ):
+ ''' See the interface IPrincipalRoleManager '''
+ pp = self._getPrincipalRoles()
+ if pp:
+ return pp.getAllCells()
+ return []
+
# Implementation helpers
def _getPrincipalRoles(self, create=0):
=== Zope3/lib/python/Zope/App/Security/IPrincipalRoleMap.py 1.1.2.3 => 1.1.2.4 ===
"""
+ def getPrincipalsAndRoles():
+ """Return all the principal/role combinations along with the
+
+ setting for each combination.
+ """
=== Zope3/lib/python/Zope/App/Security/PrincipalRoleManager.py 1.1.2.4 => 1.1.2.5 ===
return self.getCell( role, principal, default=Unset )
+ def getPrincipalsAndRoles( self ):
+ ''' See the interface IPrincipalRoleMap '''
+ return self.getAllCells()
# Roles are our rows, and principals are our columns
principalRoleManager = PrincipalRoleManager()