UserRoleAdd
You can use these functions for Optiva Workflows.
Purpose
The function UserRoleAdd assigns one or more role to the Optiva user.
Syntax
int UserRoleAdd(string UserCode, string LabCode, string RolesList)
Return Value
If the code is successful a value greater than zero (0) is displayed or else failed.
Argument
| Part | Description |
|---|---|
UserCode |
The name of the user must be provided. |
LabCode |
The lab code to which the user is assigned must be provided. |
Group/GroupList |
The role name (or) semi colon separated list of role names that needs to be tagged for the user must be provided. |
SetPassword Object method
This syntax assigns a password to the user account.
ObjMethod(symbol, code, "setPassword", oldPassword, newPassword)
Example
Function wf_start() As Long
UserGroupRemove("", "ADMIN;QA")
UserRoleRemove("", "GLOBAL", "RL_ADMIN;RL_QA")
End Function
Example 1:
UserRoleAdd("FSI", "GLOBAL", "ADMIN");
Example 2:
UserRoleAdd("FSI", "GLOBAL", "ADMIN;CORE");