HasPrivilege(Priv: SecurityPackageUserPrivilege): Boolean;
Priv — privilege type.
The HasPrivilege property determines whether the user has the privilege, which type is passed by the means of the Priv parameter.
Sub Main;
Var
MB: IMetabase;
LoS: ILogonSession;
Mu: IMetabaseUser;
SPUD: ISecurityPackageUserData;
Cr: ICredentials;
s: String;
Begin
MB:=MetabaseClass.Active;
LoS:=MB.LogonSession;
Mu:=Los.User;
SPUD:=Mu.PackageData;
If SPUD.HasPrivilege(SecurityPackageUserPrivilege.ClearJournal) Then
s:="Yes";
Else
s:="No";
End If;
End Sub Main;
After executing this example "s" variable contains "Yes" if current user has a privilege to clear access protocol.
See also: