UserKit.Role | index /usr/local/share/webware/UserKit/Role.py

Classes

``

Role

class Role
`` | `Roles are used in conjuction with RoleUser to provide role-based security. All roles have a name and a description and respond to playsRole(). RoleUser also responds to playsRole() and is the more popular entry point for programmers. Application code may then do something along the lines of: if user.playsRole('admin'): displayAdminMenuItems() See also: * class HierRole * class RoleUser`

Methods defined here:

__init__(self, name, description=None)

__repr__(self)

__str__(self)

description(self)

name(self)

playsRole(self, role)
  `Returns true if the receiving role plays the role passed in. For Role, this is simply a test of equality. Subclasses may override this method to provide richer semantics (such as hierarchical roles).`

setDescription(self, description)

setName(self, name)