Package AccessControl :: Module User :: Class BasicUser
[frames | no frames]

Type BasicUser

object --+        
         |        
      Base --+    
             |    
      Acquirer --+
                 |
                BasicUser

Known Subclasses:
PropertiedUser

Base class for all User objects
Method Summary
  __init__(self, name, password, roles, domains)
  __allow_access_to_unprotected_subobjects__(self, name, value)
  __len__(self)
  __repr__(self)
  __str__(self)
  allowed(self, object, object_roles)
Check whether the user has access to object.
  authenticate(self, password, request)
  getDomains(self)
Return the list of domain restrictions for a user
  getId(self)
Get the ID of the user.
  getRoles(self)
Return the list of roles assigned to a user.
  getRolesInContext(self, object)
Return the list of roles assigned to the user, including local roles assigned in context of the passed in object.
  getUserName(self)
Return the username of a user
  has_permission(self, permission, object)
Check to see if a user has a given permission on an object.
  has_role(self, roles, object)
Check to see if a user has a given role or roles.
  hasRole(self, *args, **kw)
hasRole is an alias for 'allowed' and has been deprecated.
    Inherited from Base
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __getnewargs__(...)
Get arguments to be passed to __new__
  __getstate__(...)
Get the object serialization state
  __reduce__(...)
Reduce an object to contituent parts for serialization
  __setstate__(...)
Set the object serialization state The state should be in one of 3 forms: - None Ignored - A dictionary In this case, the object's instance dictionary will be cleared and updated with the new state.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Class Variable Summary
Implements __implemented__ = <implementedBy AccessControl.User.Basi...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
list domains = []

Method Details

allowed(self, object, object_roles=None)

Check whether the user has access to object. The user must have one of the roles in object_roles to allow access.

getDomains(self)

Return the list of domain restrictions for a user

getId(self)

Get the ID of the user. The ID can be used, at least from Python, to get the user from the user's UserDatabase

getRoles(self)

Return the list of roles assigned to a user.

getRolesInContext(self, object)

Return the list of roles assigned to the user, including local roles assigned in context of the passed in object.

getUserName(self)

Return the username of a user

has_permission(self, permission, object)

Check to see if a user has a given permission on an object.

has_role(self, roles, object=None)

Check to see if a user has a given role or roles.

hasRole(self, *args, **kw)

hasRole is an alias for 'allowed' and has been deprecated.

Code still using this method should convert to either 'has_role' or 'allowed', depending on the intended behaviour.

Class Variable Details

__implemented__

Type:
Implements
Value:
<implementedBy AccessControl.User.BasicUser>                           

__providedBy__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0x35521f0>        

__provides__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0x35521f0>        

domains

Type:
list
Value:
[]                                                                     

Generated by Epydoc 2.1 on Tue Jul 10 16:21:30 2007 http://epydoc.sf.net