| Home | Trees | Index | Help |
|---|
|
|
User management facilities.
Access to this module is primarily through two global variables.
'database' -- The user database. The database contains objects
representing users, accessed via a *user ID*. The user ID is a label
uniquely identifying the user in the system.
The user database also provides a notion of user groups. Each group
is identified by a group ID, and contains zero or more user IDs. A
user may belong to more than one group. A group may not contain other
groups.
'authenticator' -- The authenticator object by which the application
authenticates users who attempt to access it via various channels.
Access the database object via this interface:
* Use the database object as a Python map from user IDs to 'User'
objects. The 'keys' method returns a sequence of user IDs in the
database.
* Call 'GetGroupIds' to return a sequence of group IDs. Use the
'GetGroup' method to retrieve a 'Group' object for a given group ID.
|
|||
| AuthenticationError | |||
| XmlDatabaseError | |||
| AccountDisabledError | |||
| User | A user account record. | ||
| Group | A group of users. | ||
| Authenticator | Base class for authentication classes. | ||
| DefaultDatabase | |||
| DefaultAuthenticator | Authenticator for only a single user, "default_user". | ||
| XmlDatabase | An XML user database. | ||
| XmlDatabaseAuthenticator | An authenticator based on contents of the XML user database. | ||
|
|||
|
load_xml_database(path)
Load users from XML database at 'path' and set up authenticator. |
|||
|
get_user_from_dom(user_node)
Construct a 'User' object from a user DOM element. |
|||
|
_get_dom_properties(node,
tag)
Return a dictionary of properties from a user DOM element node. |
|||
|
create_dom_for_user(document,
user)
Create a DOM element node for 'user'. |
|||
|
_create_dom_properties(element,
properties)
Add user properties to a DOM element. |
|||
|
get_group_from_dom(group_node)
Construct a 'Group' object from a DOM element. |
|||
|
create_dom_for_group(document,
group)
Create a DOM element node for 'group'. |
|||
|
|||
| xml_user_database_dtd | |||
| database | |||
| authenticator | |||
|
|||
|
Construct a 'User' object from a user DOM element. 'user_node' -- A "user" DOM element. returns -- A 'User' object. |
Return a dictionary of properties from a user DOM element node. 'node' -- A "user" DOM element. 'tag' -- The tag of the child element in which to look for properties. returns -- A map from property names to values. |
Create a DOM element node for 'user'. 'document' -- The DOM document object in which to create the element. 'user' -- A 'User' instance. returns -- A DOM element node. |
Add user properties to a DOM element. 'element' -- A DOM element node to which properties are to be added as children. 'properties' -- A map from property names to values. |
Construct a 'Group' object from a DOM element. 'group_node' -- A DOM "group" element node. returns -- A 'Group' object. |
Create a DOM element node for 'group'. 'document' -- The DOM document object in which to create the element. 'group' -- A 'Group' instance. returns -- A DOM element node. |
|
|||
xml_user_database_dtd
|
database
|
authenticator
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 3.0alpha2 on Fri Sep 28 00:57:30 2007 | http://epydoc.sf.net |