Table of Contents

Class: User qm/user.py

A user account record.

User accounts contain three sets of properties. Each property is a name-value pair. The three sets of properties are:

informational properties
General information about the user. This may include the user's real name, contact information, etc. These properties are generally user-visible, and should be modified only at the user's request.
configuration properties
Program-specific per-user configuration. This includes user's preferences, such as preferred layout and output options. These properties are typically hidden as implementation details, and are often changed implicitly as part of other operations.
authentication properties
Information used to authenticate the user. This may include such things as passwords, PGP keys, and digital certificates. There are no accessors for these properties; they should be used by authenticators only.

Methods   
GetConfigurationProperty
GetId
GetInfoProperty
GetRole
IsEnabled
SetConfigurationProperty
SetInfoProperty
__init__
  GetConfigurationProperty 
GetConfigurationProperty (
        self,
        name,
        default=None,
        )

Return a configuration property.

name
The name of the property.
default
The value to return if this property is not specified for the user account.
  GetId 
GetId ( self )

Return the user ID of this user.

  GetInfoProperty 
GetInfoProperty (
        self,
        name,
        default=None,
        )

Return an informational property.

name
The name of the property.
default
The value to return if this property is not specified for the user account.
  GetRole 
GetRole ( self )

Return the role of this user.

  IsEnabled 
IsEnabled ( self )

Return true if this account is enabled.

  SetConfigurationProperty 
SetConfigurationProperty (
        self,
        name,
        value,
        )

Set the configuration property name to value.

  SetInfoProperty 
SetInfoProperty (
        self,
        name,
        value,
        )

Set the informational property name to value.

  __init__ 
__init__ (
        self,
        user_id,
        role="user",
        enabled=1,
        information_properties={},
        configuration_properties={},
        authentication_properties={},
        )

Create a new user account.

user_id
The ID for the user.
role
If "default", this is the default user account (there should be only one). The default account, if provided, is used for otherwise unauthenticated operations. If "admin", this is an administrator account. If "user", this is an ordinary user account.
enabled
If true, this account is enabled; otherwise, disabled.
information_properties
A map contianing information properties.
configuration_properties
A map containing configuration properties.
authentication_properties
A map containing authentication properties.

Table of Contents

This document was automatically generated on Mon Jan 3 09:42:29 2005 by HappyDoc version 2.1