DeletePrivFromUser

(Security Manager Library)

Description: Removes a privilege from the specified username.
Returns: Numeric (via the first parameter)
Usage: Script Only.
Function Groups: Security
Related to: ModifyUserPrivilege
Format: \SecurityManager\DeletePrivFromUser(PtrReturnCode, Username, Privilege[, HaveLock])
Parameters:  
PtrReturnCode
Required. A pointer to a variable that will be used for the return code.

PtrReturnCode

Meaning

1

Privilege deleted.

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.

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 denied. Use a negative value for a general privilege and a positive value for a custom privilege.
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 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.