Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Component Palette Icon:

On_this_page


The User Management component provides a built-in way to edit User Source users and roles from a Vision Client. To make changes to the Gateway's system user source from the Designer or Client, the Allow User Admin setting must be enabled. This allows for the administration of the Gateway's system user source from the Designer and Vision Client. Unless this is enabled, the Vision Module's User Management component is prevented from modifying the Gateway system's selected user source and you will see an error at the bottom of the component if it is attempted.

Changed_in
Version8.1.25


If a User Source has its Schedule Restricted option enabled, modifications made using the Vision User Management component used to be ignored. Schedule modifications are now applied on top of the user's defined schedule to determine their effective schedule when evaluating for Schedule Restricted login.


This component can be run in one of three modes:

Manage Users: In this mode, the component manages all of the users contained in the user source. Users and roles may be added, removed, and edited.

Edit Single: In this mode, the component only edits a single user. Which user is being edited is controlled via the "User Source" and "Username" properties.

Edit Current: In this mode, the user who is currently logged into the project can edit themselves.  The ability to assign roles is not available in this mode. This can be useful to allow users to alter their own password, adjust their contact information, and update their schedules. 

Note

Warning: Be careful to only expose this component to users who should have the privileges to alter other users. Access to this component in Manage Users mode will allow users to edit other users' passwords and roles. 

Changed_in
Version8.1.18


The User Management component cannot be used in Edit Current mode when the Vision Client is using an Identity Provider to log in. Attempting to use the User Management component in this situation will result in the Vision client throwing an error and a warning:



Properties

NameDescriptionProperty TypeScriptingCategory
Border

The border surrounding this component. Options are: No border, Etched (Lowered), Etched (Raised), Bevel (Lowered), Bevel (Raised), Bevel (Double), Field Border, and Line Border.

Note_friendly

The border is unaffected by rotation.

Changed_in
Version8.1.21



As of 8.1.21, the "Button Border" and "Other Border" options are removed.
Border.borderCommon
Contact Info Editing EnabledIf true, a user's contact info will be editable.boolean.allowContactInfoEditingBehavior
Editing Schedule Available ColorChanges the color of the available times in the schedule. See Color Selector.Color.schedulePreviewAvailableColorAppearance
Editing Schedule Available Text ColorChanges the text color of events on the schedule preview. See Color Selector.Color.eventForegroundAppearance
EnabledIf disabled, a component cannot be used.boolean.componentEnabledCommon
FontFont of the text on this component.Font.fontAppearance
Mode

Affects what mode the user management component runs in.

ValueDescriptionintValue
Manage UsersAllows edits to all Users and Roles in a single source determined by the User Source property. Default.0
Edit CurrentAllows edits to the currently logged in user details.1
Edit SingleAllows edits to a specific user determined by the User Source and Username properties.2
int.modeBehavior
NameThe name of this component.String.nameCommon
QualityThe data quality code for any Tag bindings on this component.QualityCode.qualityData
Role Assigning EnabledIf true, a user's roles will be editable.boolean.allowRoleAssigningBehavior
Role Management EnabledIf true, role management is available.boolean.allowRoleManagementBehavior
Row HeightAlter the size of the rows in the component's tables.int.rowHeightAppearance
Schedule Adjustments EnabledIf true, a user's schedule adjustments will be editable.boolean.allowScheduleModificationsBehavior
Show Contact Info ColumnControls whether the user table shows the contact info column or not.boolean.columnContactInfoAppearance
Show Name ColumnControls whether the user table shows the name column or not.boolean.columnNameAppearance
Show Roles ColumnControls whether the user table shows the roles column or not.boolean.columnRolesAppearance
Show Schedule ColumnControls whether the user table shows the schedule column or not.boolean.columnScheduleAppearance
Show Username ColumnControls whether the user table shows the username column or not.boolean.columnUsernameAppearance
StylesContains the component's styles.Dataset.stylesAppearance
Table ColorChanges the background color of the tables, User Roles and Role Member lists. Note: When a row is selected it will revert to highlighted.Color.tableBackgroundAppearance
Table Header ColorChanges the background color of the table headers. See Color Selector.Color.tableHeaderBackgroundAppearance
Table Header Text ColorChanges the text color of the table headers. See Color Selector.Color.tableHeaderTextColorAppearance
Table Text ColorChanges the text color of the tables. Note: When a row is selected, it will revert to black. See Color Selector.Color.tableForegroundAppearance
Touchscreen ModeControls when this input component responds if touchscreen mode is enabled.int.touchscreenModeBehavior
User SourceThe user source to manage users in. If blank, uses the project's default user source.String.userProfileBehavior
UsernameThe name of the user being edited. Read-only except when mode is Edit Single, in which case it defines the user to be edited.String.usernameBehavior
Username Editing EnabledIf true, usernames will be editable.boolean.allowUsernameEditingBehavior
VisibleIf disabled, the component will be hidden.boolean.visibleCommon
Window ColorChanges the window background color. See Color Selector.Color.windowBackgroundAppearance
Window Header ColorChanges the window header background color. See Color Selector.Color.windowHeaderBackgroundAppearance
Window Header Save Button Background ColorChanges the window header save button background color. See Color Selector.Color.windowHeaderSaveButtonBackgroundAppearance
Window Header Save Button Text ColorChanges the window header save button text color. See Color Selector.Color.windowHeaderSaveButtonForegroundAppearance
Window Header Text ColorChanges the window header text color. See Color Selector.Color.windowHeaderForegroundAppearance
Window Text ColorChanges the text color of the window. See Color Selector.Color.windowForegroundAppearance
Deprecated Properties
Data QualityThe data quality code for any Tag bindings on this component.int.dataQualityDeprecated


Scripting

Component Functions

This component does not have component functions associated with it.

Extension Functions

Expand
titlefilterUser
  • 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

Expand
titlefilterRole
  • 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

Expand
titlefilterSchedule
  • 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

Expand
titleonCreateUser
  • 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

Nothing

AnchorUserManOnDeleteUserUserManOnDeleteUser
Expand
titleonDeleteUser
  • 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

Nothing

Expand
titleonSaveUser
  • 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

Nothing

Expand
titleonCreateRole
  • 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

Nothing

Expand
titleonDeleteRole
  • 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

Nothing

Expand
titleonSaveRole
  • 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

Nothing

See the Vision - User Management Scripting Functions page for the full list of scripting functions available for this component.

Event Handlers

Event handlers allow you to run a script based off specific triggers. See the full list of available event handlers on the the Component Events page page.



Examples

There are no examples associated with this component.