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

`The basic Role class.`

Classes

``

__builtin__.object
  Role

class Role(__builtin__.object)
`` | `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)
  `Return 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)

Data descriptors defined here:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`