ADMIN Model.
More...
Static Public Member Functions |
def | check_password |
| Checks for CM admin's password correctness.
|
def | superuser |
| Method checks, whether user user_id is superuser.
|
Static Public Attributes |
tuple | password = models.CharField(max_length=256) |
tuple | user = models.OneToOneField(User, primary_key=True) |
Detailed Description
ADMIN Model.
Each Cluster may be managed by individual CM Admin, separable from overall cloud's Admin. This class is for Cluster Manager's Admin.
Definition at line 36 of file admin.py.
Member Function Documentation
def src.cm.models.admin.Admin.__unicode__ |
( |
|
self | ) |
|
def src.cm.models.admin.Admin.check_password |
( |
|
admin_id, |
|
|
|
password_par |
|
) |
| |
|
static |
Checks for CM admin's password correctness.
- Parameters
-
admin_id | (int ) id of the admin whose password is checked |
password_par | (string ) password to check |
- Exceptions
-
CMException('user_permission') | |
Definition at line 77 of file admin.py.
def src.cm.models.admin.Admin.superuser |
( |
|
user_id | ) |
|
|
static |
Method checks, whether user user_id
is superuser.
Otherwise it throws CMException 'user_permission'.
- Parameters
-
user_id | (int ) id of the user |
- Returns
- (
int
) 1, if successful
- Exceptions
-
CMException('user_permission') | |
Definition at line 59 of file admin.py.
Member Data Documentation
tuple src.cm.models.admin.Admin.password = models.CharField(max_length=256) |
|
static |
tuple src.cm.models.admin.Admin.user = models.OneToOneField(User, primary_key=True) |
|
static |
The documentation for this class was generated from the following file: