Displays a form that allows a single user to enter their credentials. These credentials are checked against a specified set to ensure the user has the required privileges before allowing the operation to proceed.
The user can be a Citect or Windows user.
VerifyPrivilegeForm(sOperationDescription,sLogDevice, sAccess, sGlobalPriv, sPriv1, sPriv2, sPriv3, sPriv4, sPriv5, sPriv6, sPriv7, sPriv8)
A description of the operation that requires approval.
The name of a log device if logging is required, otherwise pass an empty string.
The required user viewable areas, or pass an empty string for none.
The required global privilege, otherwise pass an empty string.
Specifies the required areas for privileges 1 - 8. That is, sPriv1 contains the areas (1,2,3,4,...,255) where the user has Privilege 1. Each argument needs to be either specified or an empty string for none.
The name of the user that met the required privileges, otherwise ""
// This example generates a form to request a user to approve an operation.
// This user needs the global privilege level of 8.
// When approved, the operation is completed and a page string
// is set to indicate the approval status.
IF (VerifyPrivilegeForm("Shut Down Plant", "ApprovalLog", "PlantWide", "8", "", "", "", "", "", "", "", "")<>"") THEN
// Do operation
PageSetStr(1, "Operation approved");
PageSetStr(1, "Operation not approved");