Bases: stalker.models.entity.Entity, stalker.models.mixins.ACLMixin
The user class is designed to hold data about a User in the system.
There are a couple of points to take your attention to:
The code attribute is derived from the nice_name as it is in a SimpleEntity, but the nice_name is derived from the login instead of the name attribute, so the code of a User and a SimpleEntity will be different then each other. The formatting of the code attribute is as follows:
Other than these two new rules all the previous formatting rules from the SimpleEntity are valid.
Note
New to version 0.2.0 users can be assigned to a Task as a Watcher. Which can be used to inform the users in watchers list about the updates of certain Tasks.
Note
It is now possible to define Vacations per user.
Parameters: |
|
---|
Methods
__init__([name, login, email, password, ...]) | |
check_password(raw_password) | Checks the given raw_password. |
Attributes
created_by | The User who has created this object. |
created_by_id | The id of the User who has created |
date_created | A datetime.datetime instance showing the creation date and time of this object. |
date_updated | A datetime.datetime instance showing the update date and time of this object. |
departments | A list of Departments that |
description | Description of this object. |
email of the user, accepts strings or unicode | |
entities_created | |
entities_updated | |
entity_id | |
entity_type | |
generic_data | This attribute can hold any kind of data which exists in SOM. |
groups | Permission groups that this users is a member of. |
id | |
last_login | The last login time of this user. |
login | The login name of the user. |
metadata | A collection of Table objects and their associated schema |
name | Name of this object |
nice_name | Nice name of this object. |
notes | All the Notess attached to this entity. |
open_tickets | The list of open Tickets that this user has. |
password | The password of the user. |
permissions | |
plural_class_name | the plural name of this class |
projects | |
projects_lead | Projects lead by this user. |
query | ORM-level SQL construction object. |
sequences_lead | Sequences lead by this user. |
tags | A list of tags attached to this object. |
tasks | Tasks assigned to this user. |
thumbnail | |
thumbnail_id | |
tickets | The list of Tickets that this user has. |
time_logs | A list of TimeLog instances which |
tjp_id | returns TaskJuggler compatible id |
to_tjp | outputs a TaskJuggler formatted string |
type | The type of the object. |
type_id | The id of the Type of this entity. |
updated_by | The User who has updated this object. |
updated_by_id | The id of the User who has updated |
user_id | |
vacations | A list of Vacation instances |
watching | Taskss that this user is |
The login name of the user.
Can not be empty.
A list of Departments that this user is a part of
email of the user, accepts strings or unicode
The password of the user.
It is scrambled before it is stored.
The last login time of this user.
It is an instance of datetime.datetime class.
Checks the given raw_password.
Checks the given raw_password with the current Users objects encrypted password.
Checks the given raw password with the given encrypted password. Handles the encryption process behind the scene.
A datetime.datetime instance showing the creation date and time of this object.
A datetime.datetime instance showing the update date and time of this object.
Description of this object.
This attribute can hold any kind of data which exists in SOM.
Name of this object
Nice name of this object.
It has the same value with the name (contextually) but with a different format like, all the white spaces replaced by underscores (“_”), all the CamelCase form will be expanded by underscore (_) characters and it is always lower case.
All the Notess attached to this entity.
It is a list of Note instances or an empty list, setting it None will raise a TypeError.
the plural name of this class
A list of tags attached to this object.
It is a list of Tag instances which shows the tags of this object
returns TaskJuggler compatible id
The type of the object.
It is an instance of Type with a proper target_entity_type.
The id of the Type of this entity. Mainly used by SQLAlchemy to create a Many-to-One relates between SimpleEntities and Types.
The list of Tickets that this user has.
returns a list of Ticket instances which are derived from the Tasks that this user is assigned to (Stalker checks the related Version instances and then the ~stalker.models.ticket.Ticket instances assigned to the Versions.).
The list of open Tickets that this user has.
returns a list of Ticket instances which has a status of Open and are derived from the Tasks that this user is assigned to (Stalker checks the related Version instances and then the ~stalker.models.ticket.Ticket instances assigned to the Version and has a status of Open.).