cc1  v2.1
CC1 source code docs
 All Classes Namespaces Files Functions Variables Pages
src.cm.views.user.admin Namespace Reference

Functions

def check_password
 Checks caller's password.
def first_admin_add
 Creates first admin of the cluster.

Detailed Description

Note
All functions here are decorated by src.cm.utils.decorators.user_log. It's recommended to read src.cm.utils.decorators.user_log docs before using functions below.

Function Documentation

def src.cm.views.user.admin.check_password (   caller_id)

Checks caller's password.

Authentication is performed inside @admin_cm_log decorator, therefore check_password() doesn't need to perform any further action.

Note
The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
Parameters
http_request(HttpRequest)
caller_id(POST int)
admin_password(POST string)

Definition at line 93 of file admin.py.

def src.cm.views.user.admin.first_admin_add (   caller_id,
  new_password,
  clm_address 
)

Creates first admin of the cluster.

It should be called right after submiting the form for adding new CM. System will not operate properly with no CM admin existing.

Note
It can be run only if no CM admin exists in the CM database.
The cm.utils.decorators.user_log decorator performs User authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.user_log
Parameters
http_request(HttpRequest)
caller_id(POST int)
new_password(POST string) first CM admin password to set
clm_address(POST string)

Definition at line 46 of file admin.py.