[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - PrincipalPermissionManager.py:1.1.2.2 PrincipalRoleManager.py:1.1.2.2 RolePermissionManager.py:1.1.2.2
Tres Seaver
tseaver@zope.com
Thu, 13 Dec 2001 17:20:49 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv20241
Modified Files:
Tag: Zope-3x-branch
PrincipalPermissionManager.py PrincipalRoleManager.py
RolePermissionManager.py
Log Message:
- Accomodate keyword args from XML directives
=== Zope3/lib/python/Zope/App/Security/PrincipalPermissionManager.py 1.1.2.1 => 1.1.2.2 ===
principal must be an IPrincipal
"""
- grantPermissionToPrincipal = SecurityMap.addCell
+ def grantPermissionToPrincipal( self, permission, principal ):
+ self.addCell( permission, principal )
"""Return the list of principals for the given permission.
permission must be an IPermission. If no principals have been granted
this permission, then the empty list is returned.
"""
- getPrincipalsForPermission = SecurityMap.getColumnsForRow
+ def getPrincipalsForPermission( self, permission ):
+ return self.getColumnsForRow( permission )
"""Return the list of permissions for the given principal.
principal must be an IPrincipal. If no permissions have been granted
to this principal, then the empty list is returned.
"""
- getPermissionsForPrincipal = SecurityMap.getRowsForColumn
+ def getPermissionsForPrincipal( self, principal ):
+ return self.getRowsForColumn( principal )
# Permissions are our rows, and principals are our columns
=== Zope3/lib/python/Zope/App/Security/PrincipalRoleManager.py 1.1.2.1 => 1.1.2.2 ===
principal must be an IPrincipal
"""
- assignRoleToPrincipal = SecurityMap.addCell
+ def assignRoleToPrincipal( self, role, principal ):
+ self.addCell( role, principal )
"""Return the list of principals assigned the given role.
role must be an IRole. If no principals have been assigned
this role, then the empty list is returned.
"""
- getPrincipalsForRole = SecurityMap.getColumnsForRow
+ def getPrincipalsForRole( self, role ):
+ return self.getColumnsForRow( role )
"""Return the list of roles assigned to the given principal.
principal must be an IPrincipal. If no roles have been assigned
to this principal, then the empty list is returned.
"""
- getRolesForPrincipal = SecurityMap.getRowsForColumn
+ def getRolesForPrincipal( self, principal ):
+ return self.getRowsForColumn( principal )
# Roles are our rows, and principals are our columns
=== Zope3/lib/python/Zope/App/Security/RolePermissionManager.py 1.1.2.1 => 1.1.2.2 ===
role must be an IRole
"""
- grantPermissionToRole = SecurityMap.addCell
+ def grantPermissionToRole( self, permission, role ):
+ self.addCell( permission, role )
"""Return the list of roles for the given permission.
permission must be an IPermission. If no roles have been granted this
permission, then the empty list is returned.
"""
- getRolesForPermission = SecurityMap.getColumnsForRow
+ def getRolesForPermission( self, permission ):
+ return self.getColumnsForRow( permission )
"""Return the list of permissions for the given role.
role must be an IRole. If no permissions have been granted to this
role, then the empty list is returned.
"""
- getPermissionsForRole = SecurityMap.getRowsForColumn
+ def getPermissionsForRole( self, role ):
+ return self.getRowsForColumn( role )
def setPermissionAcquired(self, permission, flag):
"""Set a flag indicating whether permission settings are acquired.