ModifyUserPrivilege
(Security Manager Library)
| Description: |
Modifies a privilege for the specified username. |
| Returns: |
Numeric (via the first parameter) |
Usage:  |
Script Only. |
| Function Groups: |
Security |
| Related to: |
|
Format:  |
\SecurityManager\ModifyUserPrivilege(PtrReturnCode, Username, Privilege, SetPrivilege[, HaveLock]) |
| Parameters: |
|
| PtrReturnCode |
Required. A pointer to a variable that will be used for the return code.PtrReturnCode | Meaning |
|---|
1 | Privilege modified. | 2 | Denied. The calling context does not have the Manager general privilege. | 3 | The privilege is not valid - no action taken. | 4 | The specified user does not exist - no action taken. | 5 | The SetPrivilege flag is invalid - no action taken. | 6 | The application cannot be edited. |
|
| UserName |
| Required. Any expression for the name of the user account to modify. |
| Privilege |
| Required. Any numeric expression for the privilege to be modified. Use a negative value for a general privilege and a positive value for a custom privilege. |
| SetPrivilege |
| A Boolean expression. Set TRUE if the privilege is to be added. |
| HaveLock |
| Optional Boolean expression. Set to true if we have the WC lock. Defaults to 0 or FALSE. |
| Comments: |
May only be called from a user-context that has the Manager general privilege. The return value of the function is the object value of the launched worker module. This will be set to Invalid when the operation has completed and may be used to discover when that occurs. Use of this function requires an understanding of the VTScada security system and the general privileges. Please refer to System Privileges in the chapter Security Manager Service. |
Trihedral and VTScada are registered trade marks of Trihedral Engineering Limited
© Trihedral Engineering Limited 1987- 2026 All rights reserved.