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

`The RoleUser class.`

Classes

``

UserKit.User.User(__builtin__.object)
  RoleUser

class RoleUser(UserKit.User.User)
`` | `In conjunction with Role, provides role-based users and security. See the doc for playsRole() for an example. Note that this class plays nicely with both Role and HierRole, e.g., no "HierRoleUser" is needed when making use of HierRoles. See also: * class Role * class HierRole`

Method resolution order:
  RoleUser
  UserKit.User.User
  __builtin__.object

Methods defined here:

__init__(self, manager=None, name=None, password=None)

addRoles(self, listOfRoles)
  `Add additional roles for the user.
  Each role in the list may be a valid role name or a Role object.`

playsRole(self, roleOrName)
  `Check whether the user plays the given role.
  More specifically, if any of the user's roles return true for
  role.playsRole(otherRole), this method returns True.
  The application of this popular method often looks like this:
  if user.playsRole('admin'):
  displayAdminMenuItems()`

roles(self)
  `Return a direct list of the user's roles.
  Do not modify.`

setRoles(self, listOfRoles)
  `Set all the roles for the user.
  Each role in the list may be a valid role name or a Role object.
  Implementation note: depends on addRoles().`

Methods inherited from UserKit.User.User:

__str__(self)

creationTime(self)

externalId(self)

isActive(self)

lastAccessTime(self)

lastLoginTime(self)

login(self, password, fromMgr=0)
  `Return self if the login is successful and None otherwise.`

logout(self, fromMgr=False)

manager(self)

name(self)

password(self)

serialNum(self)

setManager(self, manager)
  `Set the manager, which can only be done once.`

setName(self, name)
  `Set the name, which can only be done once.`

setPassword(self, password)

setSerialNum(self, serialNum)

wasAccessed(self)

Data descriptors inherited from UserKit.User.User:

__dict__
  `dictionary for instance variables (if defined)`

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