cc1
v2.1
CC1 source code docs
|
Here are placed decorators for CLM views functions targeted to specific CLM role actors (and src.clm.utils.decorators.genericlog() called by all those). More...
Functions | |
def | admin_clm_log |
Decorator for functions requiring admin_clm's privilidges. | |
def | admin_cm_log |
Decorator for functions requiring admin_cm's privilidges. | |
def | auth |
def | cm_request |
Decorator for CM views functions that: | |
def | genericlog |
Generic log is called by actor decorators defined in src.clm.utils.decorators : | |
def | guest_log |
Decorator for functions requiring only guest's privilidges. | |
def | user_log |
Decorator for functions requiring logged in user's privilidges. |
Variables | |
tuple | decorated_functions = set([]) |
Here are placed decorators for CLM views functions targeted to specific CLM role actors (and src.clm.utils.decorators.genericlog() called by all those).
All those decorators call src.clm.utils.decorators.genericlog(). By default those decorators call src.clm.utils.decorators.genericlog with logging disabled. You can enable it by giving kwarg log=True
, when decorating, eg.:
def src.clm.utils.decorators.admin_clm_log | ( | arg, | |
kw | |||
) |
Decorator for functions requiring admin_clm's privilidges.
src.clm.utils.decorators.genericlog is called with parameters:
is_user=True
is_clm_superuser=True
is_cm_superuser=False
password
argument is removed by src.cm.utils.decorators.genericlog()
, so it doesn't appear in formal parameters of the function.
Definition at line 194 of file decorators.py.
def src.clm.utils.decorators.admin_cm_log | ( | arg, | |
kw | |||
) |
Decorator for functions requiring admin_cm's privilidges.
src.clm.utils.decorators.genericlog is called with parameters:
is_user=True
is_clm_superuser=False
is_cm_superuser=True
password
argument is removed by src.cm.utils.decorators.genericlog()
, so it doesn't appear in formal parameters of the function.
Definition at line 157 of file decorators.py.
def src.clm.utils.decorators.auth | ( | is_user, | |
is_clm_superuser, | |||
data | |||
) |
Definition at line 208 of file decorators.py.
def src.clm.utils.decorators.cm_request | ( | fun | ) |
Decorator for CM views functions that:
Decorated function ought to be defined like:
Definition at line 336 of file decorators.py.
def src.clm.utils.decorators.genericlog | ( | log_enabled, | |
pack_resp, | |||
is_user, | |||
is_clm_superuser, | |||
is_cm_superuser, | |||
fun, | |||
args, | |||
kwargs | |||
) |
Generic log is called by actor decorators defined in src.clm.utils.decorators :
It calls decorated functions, additionally performing several tasks.
Genericlog performes:
log_enabled
and function's success;dict
) response; fields:status
(string
) 'ok', if succeededdata
(dict
) response data Definition at line 272 of file decorators.py.
def src.clm.utils.decorators.guest_log | ( | arg, | |
kw | |||
) |
Decorator for functions requiring only guest's privilidges.
src.clm.utils.decorators.genericlog() is called with parameters:
is_user=False
is_clm_superuser=False
is_cm_superuser=False
Definition at line 87 of file decorators.py.
def src.clm.utils.decorators.user_log | ( | arg, | |
kw | |||
) |
Decorator for functions requiring logged in user's privilidges.
src.clm.utils.decorators.genericlog() is called with parameters:
is_user=True
is_clm_superuser=False
is_cm_superuser=False
Definition at line 120 of file decorators.py.
tuple src.clm.utils.decorators.decorated_functions = set([]) |
Definition at line 64 of file decorators.py.