SecurityUpdateUserParameter
This method establishes default group settings in Web Verifier for script imported users that do not have the SET role so that they are able to load projects and jobs.
With this method implemented, the corresponding group is found and assigned to the user as the PrimaryUserGroup.
If the group or the user cannot be found, a corresponding error message is shown.
This method works with auto-imported users as well as with normal users.
Call this method between SecurityUpdateStart and SecurityUpdateCommit.
An administrator needs to configure the group settings in the Web Verifier settings.
Syntax
SecurityUpdateUserParameter (BSTR UserName, BSTR UserDomain, BSTR ParameterName, VARIANT Param1, VARIANT Param2)
Parameter | Description |
---|---|
ParameterName | PrimaryGroupID
This parameter can have two variants:
"ExternalGroupID" with Param2 as Integer that represents the ExternalGroupID that was added in SecurityUpdateAddUserGroup or SecurityUpdateAddUserGroupPwd. |
Sample Code
Add user A to two groups (100 and 101) and set his primary group for settings to be group 100.
Add user Domain\B to one group and set his primary group for settings to be Autoimport_100. This is the displayed name of the group 100 in the Web Verifier administrator group settings.
Private Sub ScriptModule_UpdateSystemSecurity(ByVal InstanceName as String)
Project.SecurityUpdateStart
Project.SecurityUpdateAddUserGroupPwd("A", "pass", 100, "VER|FLT", "")
Project.SecurityUpdateAddUserGroupPwd("A", "pass", 101, "VER|FLT", "")
Project.SecurityUpdateUserParameter("A", "", "PrimaryGroupID", "ExternalGroupID", 100)
Project.SecurityUpdateAddUserGroup("B", 100, "VER", "Domain")
Project.SecurityUpdateUserParameter("B", "Domain", "PrimaryGroupID", "GroupName", "AutoImport_100")
Project.SecurityUpdateCommit
End Sub