endi.forms.user package¶
Submodules¶
endi.forms.user.career_path module¶
Career path forms configuration
- endi.forms.user.career_path.customize_schema(schema)¶
Customize the form schema :param obj schema: A CareerPath schema
- endi.forms.user.career_path.end_date_validator(node, appstruct)¶
Check if end_date is posterior to start_date :param node: :param appstruct: :return: Exception exc
- endi.forms.user.career_path.get_add_stage_schema()¶
Return a schema for adding a new career path’s stage Only display stage’s type and dates
- endi.forms.user.career_path.get_edit_stage_schema(stage_type)¶
Return a schema for editing career path’s stage related to the stage’s type
endi.forms.user.company module¶
Form schema used to managed relationship between a user and a company
- class endi.forms.user.company.CompanySchema(*args, **kw)¶
Bases :
SequenceSchema
- endi.forms.user.company.get_companies_choices()¶
Return companies choices for autocomplete
- endi.forms.user.company.get_company_association_schema()¶
Return the schema used to associate a user to an existing company
endi.forms.user.login module¶
Login related form schemas
1- Password change 2- Add/Edit Form 3- Group configuration
- class endi.forms.user.login.AuthSchema(*args, **kw)¶
Bases :
BaseAuthSchemaSchema for authentication form
- class endi.forms.user.login.BaseAuthSchema(*args, **kw)¶
Bases :
SchemaBase auth schema (sufficient for json auth)
- endi.forms.user.login.get_add_edit_schema(edit=False)¶
Add a form schema for login add/edit
- Renvoie:
A colander form schema
- endi.forms.user.login.get_auth_schema()¶
return the authentication form schema
- endi.forms.user.login.get_auth_validator(current_login_object=None)¶
Build an authentication validator
- Paramètres:
current_login_object (obj) – If a login instance is provided use it for
authentication
- endi.forms.user.login.get_groups(request)¶
Collect non primary groups
- Renvoie:
available groups as a list of 2-uples (name, label)
- endi.forms.user.login.get_json_auth_schema()¶
return the auth form schema in case of json auth
- endi.forms.user.login.get_password_schema()¶
Return the schema for user password change
- Renvoie:
a colander Schema
- endi.forms.user.login.get_primary_groups(request)¶
Collect non primary groups
- Renvoie:
available groups as a list of 2-uples (name, label)
- endi.forms.user.login.remove_actual_password_my_account(schema, kw)¶
Remove the actual password field if it’s not the current_user’s account
- endi.forms.user.login.set_widgets(schema)¶
Set common widgets on the schema object
- Paramètres:
schema (obj) – a colander schema
endi.forms.user.user module¶
User account handling form schemas
- class endi.forms.user.user.UserDisableSchema(*args, **kw)¶
Bases :
Schema
- endi.forms.user.user.get_add_edit_schema(edit=False)¶
Return a user add schema
- endi.forms.user.user.get_connections_schema()¶
Return a schema for filtering the users connections list
- endi.forms.user.user.get_connections_years(kw)¶
- endi.forms.user.user.get_edit_account_schema()¶
Build a schema for user account schema edition
Allow to edit email informations
- endi.forms.user.user.get_edit_accounting_schema()¶
Return a schema for user accounting datas edition
- endi.forms.user.user.get_list_schema()¶
Return a schema for filtering the user list
- endi.forms.user.user.remove_admin_list_fields(schema, kw)¶
Remove admin specific filter fields
- Paramètres:
schema (obj) – The colander Schema
kw (dict) – The bind parameters
- endi.forms.user.user.set_widgets(schema)¶
Customize form widgets
- Paramètres:
schema (obj) – The colander Schema to edit
endi.forms.user.userdatas module¶
Userdatas related form informations
- endi.forms.user.userdatas.add_custom_fields_to_schema(schema)¶
Add autorized custom fields the form schema :param obj schema: A UserDatas schema
- endi.forms.user.userdatas.customize_schema(schema)¶
Customize the form schema :param obj schema: A UserDatas schema
- endi.forms.user.userdatas.get_add_edit_schema()¶
Build a colander schema for UserDatas add edit :returns: A colander schema
- endi.forms.user.userdatas.get_custom_fields_schema_grid()¶
Build a colander schema grid for UserDatasCustomFields
- endi.forms.user.userdatas.get_doctypes_schema(userdatas_model)¶
Build a form schema for doctypes registration
- Paramètres:
userdatas_model (obj) – An instance of userdatas we’re building
the form for
- endi.forms.user.userdatas.get_list_schema()¶
Return a list schema for user datas
- endi.forms.user.userdatas.get_userdatas_custom_field_values(field)¶
Return distinct values of specific UserDatas Custom Field
Module contents¶
- endi.forms.user.antenne_node(multi_companies=True, multiple=False, **kw)¶
Return a schema node for antenne selection
- endi.forms.user.follower_node(multiple=False, **kw)¶
Return a schema node for follower selection
- endi.forms.user.get_antenne_options(roles=None)¶
- Return the list of active users from the database formatted as choices:
[(user_id, user_label)…]
- Paramètres:
role – roles of the users we want default: all values : (“contractor”, “manager”, “admin”))
- endi.forms.user.get_deferred_antenne_choice(multi_companies=True, widget_options=None)¶
Return a colander deferred for antenne selection options
- endi.forms.user.get_deferred_follower_choice(widget_options=None, no_follower=False)¶
Return a colander deferred for users selection options
- endi.forms.user.get_deferred_user_choice(roles=None, widget_options=None)¶
Return a colander deferred for users selection options
- endi.forms.user.get_users_options(roles=None)¶
- Return the list of active users from the database formatted as choices:
[(user_id, user_label)…]
- Paramètres:
role – roles of the users we want default: all values : (“contractor”, “manager”, “admin”))
- endi.forms.user.user_node(roles=None, multiple=False, **kw)¶
Return a schema node for user selection roles: allow to restrict the selection to the given roles
(to select between admin, contractor and manager)