cc1  v2.1
CC1 source code docs
 All Classes Namespaces Files Functions Variables Pages
src.clm.models.user.User Class Reference

USER Model. More...

Classes

class  Meta

Public Member Functions

def __unicode__
def dict
def own_groups
def short_dict

Static Public Member Functions

def get
def is_leader
def superuser

Static Public Attributes

tuple act_key = models.CharField(max_length=63, null=True, blank=True)
 activation key (required only for specific registration types)
tuple activation_date = models.DateTimeField(null=True, blank=True)
tuple default_cluster = models.ForeignKey(Cluster, null=True, blank=True, on_delete=models.SET_NULL)
 default Cluster.
tuple email = models.CharField(max_length=255, unique=True)
 User's email (unique)
tuple first = models.CharField(max_length=63)
 User's first name.
tuple is_active = models.IntegerField()
 whether User is active and have rights to use the system
tuple is_superuser = models.IntegerField(null=True, blank=True)
 whether User has admin priviledges
tuple is_superuser_cm = models.IntegerField(null=True, blank=True)
 whether User has admin priviledges on any CM
tuple last = models.CharField(max_length=63)
 User's last name.
tuple last_login_date = models.DateTimeField(null=True, blank=True)
tuple login = models.CharField(max_length=63, unique=True)
 Users's login for authentication (unique)
tuple organization = models.CharField(max_length=63)
 User's company or organization.
tuple password = models.CharField(max_length=255)
 User's password for authentication.

Detailed Description

USER Model.

CLM User may have access to one or many CMs. There's one default CM for each User. Quotas are set per CM, however general User data is defined globally in CLM, within this model.

Definition at line 38 of file user.py.

Member Function Documentation

def src.clm.models.user.User.__unicode__ (   self)
Returns
(string) User first and last name

Definition at line 76 of file user.py.

def src.clm.models.user.User.dict (   self)
Returns
(dict) this User's data
fields:
  • user_id (int) id of this User
  • first (string) first name
  • last (string) last name
  • default_cluster_id (int) id of this User's default cluster
  • login (string) login
  • email (string) email
  • act_key (string) activation key's content
  • organization (string) organization
  • is_active (bool) true for active User
  • is_superuser (bool) true for User with admin privilidges
  • activation_date (datetime.datetime) activation's date
  • last_login_date (datetime.datetime) last login's date

Definition at line 97 of file user.py.

def src.clm.models.user.User.get (   user_id)
static
Parameters
user_id(int) primary index of the User
Returns
(User) instance of requested User
Exceptions
CLMException('user_get')

Definition at line 148 of file user.py.

def src.clm.models.user.User.is_leader (   user_id,
  group_id 
)
static
Parameters
user_id(int) User's id
group_id(int) Group's id
Returns
(bool) True if User is the Group's leader
Exceptions
CLMException('user_permission')User isn't the leader of the given Group

Definition at line 165 of file user.py.

def src.clm.models.user.User.own_groups (   self)
Returns
(Group queryset) all instances of the groups this User is leader of

Definition at line 136 of file user.py.

def src.clm.models.user.User.short_dict (   self)
Returns
(dict) very short version of User's data
fields:
  • user_id (int) id of this User
  • first (string) first name
  • last (string) last name

Definition at line 123 of file user.py.

def src.clm.models.user.User.superuser (   user_id)
static
Parameters
user_id(int) User's id
Returns
(bool)
  • True - User is superuser
Exceptions
CLMException('user_permission')User isn't superuser

Definition at line 193 of file user.py.

Member Data Documentation

tuple src.clm.models.user.User.act_key = models.CharField(max_length=63, null=True, blank=True)
static

activation key (required only for specific registration types)

Note
each instance of the model has corresponding non-static attribute

Definition at line 53 of file user.py.

tuple src.clm.models.user.User.activation_date = models.DateTimeField(null=True, blank=True)
static
Note
each instance of the model has corresponding non-static attribute

Definition at line 65 of file user.py.

tuple src.clm.models.user.User.default_cluster = models.ForeignKey(Cluster, null=True, blank=True, on_delete=models.SET_NULL)
static

default Cluster.

Note
each instance of the model has corresponding non-static attribute

Definition at line 44 of file user.py.

tuple src.clm.models.user.User.email = models.CharField(max_length=255, unique=True)
static

User's email (unique)

Note
each instance of the model has corresponding non-static attribute

Definition at line 51 of file user.py.

tuple src.clm.models.user.User.first = models.CharField(max_length=63)
static

User's first name.

Note
each instance of the model has corresponding non-static attribute

Definition at line 40 of file user.py.

tuple src.clm.models.user.User.is_active = models.IntegerField()
static

whether User is active and have rights to use the system

Note
each instance of the model has corresponding non-static attribute

Definition at line 58 of file user.py.

tuple src.clm.models.user.User.is_superuser = models.IntegerField(null=True, blank=True)
static

whether User has admin priviledges

Note
each instance of the model has corresponding non-static attribute

Definition at line 60 of file user.py.

tuple src.clm.models.user.User.is_superuser_cm = models.IntegerField(null=True, blank=True)
static

whether User has admin priviledges on any CM

Note
each instance of the model has corresponding non-static attribute

Definition at line 62 of file user.py.

tuple src.clm.models.user.User.last = models.CharField(max_length=63)
static

User's last name.

Note
each instance of the model has corresponding non-static attribute

Definition at line 42 of file user.py.

tuple src.clm.models.user.User.last_login_date = models.DateTimeField(null=True, blank=True)
static
Note
each instance of the model has corresponding non-static attribute

Definition at line 67 of file user.py.

tuple src.clm.models.user.User.login = models.CharField(max_length=63, unique=True)
static

Users's login for authentication (unique)

Note
each instance of the model has corresponding non-static attribute

Definition at line 47 of file user.py.

tuple src.clm.models.user.User.organization = models.CharField(max_length=63)
static

User's company or organization.

Note
each instance of the model has corresponding non-static attribute

Definition at line 55 of file user.py.

tuple src.clm.models.user.User.password = models.CharField(max_length=255)
static

User's password for authentication.

Note
each instance of the model has corresponding non-static attribute

Definition at line 49 of file user.py.


The documentation for this class was generated from the following file: