ISecurityPackageUserData.HasPrivilege

Syntax

HasPrivilege(Priv: SecurityPackageUserPrivilege): Boolean;

Parameters

Priv. Privilege type.

Description

The HasPrivilege property determines whether the user has the specified privilege.

Example

Sub UserProc;
Var
    MB: IMetabase;
    LoS: ILogonSession;
    Mu: IMetabaseUser;
    SPUD: ISecurityPackageUserData;
Begin
    MB := MetabaseClass.Active;
    LoS := MB.LogonSession;
    Mu := Los.User;
    SPUD := Mu.PackageData;
    Debug.WriteLine(SPUD.HasPrivilege(SecurityPackageUserPrivilege.ClearJournal)?
        "The user " + Mu.Name + " has access control clearing privilege.":
        "The user " + Mu.Name + " does not have access protocol clearing privilege.");
End Sub UserProc;

After executing the example the development environment console displays information about presence or absence of access protocol clearing license for the current user.

See also:

ISecurityPackageUserData