Cicode Programming Reference > Cicode Function Categories > Security Functions Introduction > VerifyPrivilegeForm

VerifyPrivilegeForm

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.

Syntax

VerifyPrivilegeForm(sOperationDescription,sLogDevice, sAccess, sGlobalPriv, sPriv1, sPriv2, sPriv3, sPriv4, sPriv5, sPriv6, sPriv7, sPriv8)

sOperationDescription:

A description of the operation that requires approval.

sLogDevice:

The name of a log device if logging is required, otherwise pass an empty string.

sAccess:

The required user viewable areas, or pass an empty string for none.

sGlobalPriv:

The required global privilege, otherwise pass an empty string.

sPriv1..8:

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.

Return Value

The name of the user that met the required privileges, otherwise ""

Related Functions

FormSecurePassword

MultiSignatureForm

MultiSignatureTagWrite

VerifyPrivilegeTagWrite

Example

// 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");
ELSE
PageSetStr(1, "Operation not approved");
END

See Also

Security Functions

Form Functions