noc.aaa.models.user

Module Contents

noc.aaa.models.user.id_lock
class noc.aaa.models.user.User

Bases: noc.core.model.base.NOCModel

class Meta

Bases: object

verbose_name = User
verbose_name_plural = Users
app_label = aaa
db_table = auth_user
ordering = ['username']
username
first_name
last_name
email
password
is_active
is_superuser
date_joined
groups
preferred_language
heatmap_lon
heatmap_lat
heatmap_zoom
last_login
_id_cache
_name_cache
contacts
active_contacts

Get list of currently active contacts

Returns:List of (method, params)
__str__(self)
classmethod get_by_id(cls, id)
classmethod get_by_username(cls, name)
is_authenticated(self)

Always return True. This is a way to tell if the user has been authenticated in templates.

set_password(self, raw_password)
check_password(self, raw_password)

Returns a boolean of whether the raw_password was correct. Handles hashing formats behind the scenes.

set_unusable_password(self)
get_full_name(self)

Returns the first_name plus the last_name, with a space in between.

register_login(self, ts=None)

Register user login

Parameters:ts – Login timestamp
Returns: