cc1
v2.1
CC1 source code docs
|
Functions | |
def | activate |
Activates specified User. | |
def | block |
Block/unblocks User account. | |
def | delete |
Deletes User. | |
def | edit |
def | get_by_id |
def | get_list |
def | set_admin |
Sets/unsets User as CLM admin. | |
def | set_password |
def src.clm.views.admin_clm.user.activate | ( | cm_id, | |
caller_id, | |||
user_id, | |||
wi_data | |||
) |
Activates specified User.
Activation may require several actions, depending on instructions provided in CLM's config.py file.
http_request | (HttpRequest ) |
cm_id | (POST int ) session cm_id |
login | (POST string ) |
admin_password | (POST string ) |
user_id | (POST int ) id of the User to activate |
wi_data | (POST dict ) data for confirmation email |
list(dict)
) unlocked CMs available for user def src.clm.views.admin_clm.user.block | ( | cm_id, | |
caller_id, | |||
user_id, | |||
wi_data, | |||
block | |||
) |
Block/unblocks User account.
User should not and cannot be deleted. For technical and legal reasons in order to restrict its access to CC1 Cloud it should only be blocked. That way blocked User's data and activities stay stored in database. In case of detection of any suspicious / illegal activity performed on blocked User's Virtual Machine or using its Public IP, that activity may be associated with User account.
http_request | (HttpRequest ) |
cm_id | (POST int ) session cm_id |
login | (POST string ) |
admin_password | (POST string ) |
user_id | (POST int ) |
wi_data | (POST dict ) fields: 'site_name' |
block | (POST bool ) whether to block or unblock. |
def src.clm.views.admin_clm.user.delete | ( | cm_id, | |
caller_id, | |||
user_id | |||
) |
Deletes User.
For technical and legal reasons only inactive User may be deleted. Other users may only be blocked.
http_request | (HttpRequest ) |
cm_id | (POST int ) session cm_id |
login | (POST string ) |
admin_password | (POST string ) |
user_id | (POST int ) id of the User to delete |
def src.clm.views.admin_clm.user.edit | ( | cm_id, | |
caller_id, | |||
user_id, | |||
first = None , |
|||
last = None , |
|||
organization = None , |
|||
email = None |
|||
) |
http_request | (HttpRequest ) |
cm_id | (POST int ) session cm_id |
login | (POST string ) |
admin_password | (POST string ) |
user_id | (POST int ) id of the user to edit |
first | (POST string ) new firstname |
last | (POST string ) new lastname |
organization | (POST string ) new organization user belong to |
(POST string ) new user's email |
dict
) edited User data after update, (User.dict() property) def src.clm.views.admin_clm.user.get_by_id | ( | cm_id, | |
caller_id, | |||
user_id | |||
) |
http_request | (HttpRequest ) |
cm_id | (POST int ) session cm_id |
login | (POST string ) |
admin_password | (POST string ) |
user_id | (POST int ) |
dict
) requested User data (User.dict() property) def src.clm.views.admin_clm.user.get_list | ( | cm_id, | |
caller_id | |||
) |
http_request | (HttpRequest ) |
cm_id | (POST int ) session cm_id |
login | (POST string ) |
admin_password | (POST string ) |
list(dict)
) dict property for each User def src.clm.views.admin_clm.user.set_admin | ( | cm_id, | |
caller_id, | |||
user_id, | |||
admin | |||
) |
Sets/unsets User as CLM admin.
CLM admin has an ability to manage Cloud Users.
http_request | (HttpRequest ) |
cm_id | (POST int ) session cm_id |
login | (POST string ) |
admin_password | (POST string ) |
user_id | (POST int ) id of the User to set superuser |
admin | (POST bool ) if True - User becomes admin, if False - User loses admin priviledges |
def src.clm.views.admin_clm.user.set_password | ( | cm_id, | |
caller_id, | |||
user_id, | |||
new_password | |||
) |
http_request | (HttpRequest ) |
cm_id | (POST int ) session cm_id |
login | (POST string ) |
admin_password | (POST string ) |
user_id | (POST int ) User id |
new_password | (POST string ) new password |