[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - AttributeRolePermissionManager.py:1.1.2.4 RolePermissionManager.py:1.1.2.7
Anthony Baxter
anthony@interlink.com.au
Sat, 9 Feb 2002 17:53:39 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv16918
Modified Files:
Tag: Zope-3x-branch
AttributeRolePermissionManager.py RolePermissionManager.py
Log Message:
oops. Forgot to commit the getRolesAndPermissions and getSetting methods.
=== Zope3/lib/python/Zope/App/Security/AttributeRolePermissionManager.py 1.1.2.3 => 1.1.2.4 ===
return []
+ def getRolesAndPermissions( self ):
+ '''See interface IRolePermissionMap'''
+ pp = self._getRolePermissions()
+ if pp:
+ return pp.getAllCells( role )
+ else:
+ return []
+
+ def getSetting( self, permission, role ):
+ '''See interface IRolePermissionMap'''
+ pp = self._getRolePermissions()
+ if pp:
+ return self.getCell( permission, role )
+ else:
+ return Unset
+
def _getRolePermissions(self, create=0):
""" Get the role permission map stored in the context, optionally
creating one if necessary """
=== Zope3/lib/python/Zope/App/Security/RolePermissionManager.py 1.1.2.6 => 1.1.2.7 ===
return self.getCol( role )
+ def getSetting( self, permission, role ):
+ '''See interface IRolePermissionMap'''
+ return self.getCell( permission, role )
+
+ def getRolesAndPermissions( self ):
+ '''See interface IRolePermissionMap'''
+ return self.getAllCells()
+
# Permissions are our rows, and roles are our columns
rolePermissionManager = RolePermissionManager()