Vision - User Management Scripting Functions
This page details the various component and extension functions available for Vision's User Management component.
Component Functionsβ
This component does not have component functions associated with it.
Extension Functionsβ
filterUserβ
-
Description
- Called for each user loaded into the management table. Return false to hide this user from the management table. This code is executed in a background thread.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- User Object user - The user object itself. Call user.get('propertyName') to inpsect. Common properties: 'username',' schedule', 'language', user.getRoles() for a list of rolenames.
-
Return
- Boolean
filterRoleβ
-
Description
- Called for each role loaded into the management table. Return false to hide this role from the management table. This code is executed in a background thread.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- String role - The role name.
-
Return
- Boolean
filterScheduleβ
-
Description
- Called for each schedule loaded into the schedule dropdown in the edit user panel. Return false to hide this schedule from the dropdown. This code is executed in a background thread.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- String schedule - The schedule name.
-
Return
- Boolean
onCreateUserβ
-
Description
- Called when the add button is pressed in the users table
-
Parameters
- Component self - A reference to the component that is invoking this function.
- Object saveContext - An object that can be used to reject the add by calling saveContext.rejectSave('reason')
-
Return
- None
onDeleteUserβ
-
Description
- Called when the delete button is pressed in the users table. This code is executed in the background thread and is called once for each user selected.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- Object saveContext - An object that can be used to reject the edit by calling saveContext.rejectSave('reason'). If more than one user is rejected, reasons will be concatenated.
- Object user - The user that is trying to be deleted. Call user.get('propertyName') to inspect. Common properties: 'username', 'schedule', 'language'. Call user.getRoles() for a list of rolenames.
-
Return
- None
onSaveUserβ
-
Description
- Called when the save button is pressed when adding or editing a user. This code is executed in a background thread.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- Object saveContext - An object that can be used to reject the edit by calling saveContext.rejectSave('reason').
- User Object user - The user that is trying to be saved. Call user.get('propertyName') to inspect. Common properties: 'username', 'schedule','language'. Call user.getRoles() for a list of rolenames.
-
Return
- None
onCreateRoleβ
-
Description
- Called when the add button is pressed in the roles table.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- Object saveContext - An object that can be used to reject the add by calling saveContext.rejectSave('reason')
-
Return
- None
onDeleteRoleβ
-
Description
- Called when the save button is pressed when adding or editing a role. This code is executed in a background thread.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- Object saveContext - An object that can be used to reject the edit by calling saveContext.rejectSave('reason'). If more than one role is rejected, reasons will be concatenated.
- String name - The role name that is being deleted.
-
Return
- None
onSaveRoleβ
-
Description
- Called when the save button is pressed when adding or editing a role. This code is executed in a background thread.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- Object saveContext - An object that can be used to reject the edit by calling saveContect.rejectSave('reason').
- String oldName - The role name before editing. Will be None for a role being added.
- String newName - The new name of the edited role.
-
Return
- None