IAuditFilterCondition.Operation

Syntax

Operation(Index: Integer): Integer;

Parameters

Index. index of a position of a determined operation.

Description

The Operation property determines operations that information is displayed in access protocol.

Comments

The number of positions is determined by the IAuditFilterCondition.OperationCount property.

Operations values can match that is why to determine explicitly one should assign the object class, for which data of the operation is displayed in access protocol.

To assign an operation one should use values of the MetabaseObjectPredefinedRights enumeration type. This enumeration contains basic and additional operations, on which permissions can be granted and access audit can be executed. The specific operations are available for specific object classes. To use specific operations depending on the object class one can use values of the following enumerations:

Basic, additional and specific operations available for specified objects types are shown in the Logged Operations section.

Example

To execute the example, add a link to the Metabase system assembly.

Sub UserProc;
Var
    Mb: IMetabase;
    Log: IAuditLog;
    Fil: IAuditFilter;
    Con: IAuditFilterCondition;
    AL: IAuditLogons;
    AO: IAuditOperations;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    Log := Mb.Security.OpenAuditLog;
    Fil := Log.Filter;
    Fil.Clear;
    Con := Fil.Add;
    Con.MinDate := DateTime.Parse(
"11.01.2019 00:00:00");
    Con.OperationCount := 
2;
    Con.Operation(
0) := MetabaseObjectPredefinedRights.Create_;
    Con.OperationClass(
0) := MetabaseObjectClass.KE_CLASS_METABASEUPDATEOBJECT;
    Con.Operation(
1) := MetabaseObjectPredefinedRights.Delete Or MetabaseObjectPredefinedRights.Create_;
    Con.OperationClass(
1) := MetabaseObjectClass.KE_CLASS_FOLDER;
    AL := Log.OpenLogons(
False);
    
While Not AL.Eof Do
        
Debug.WriteLine(AL.UserName + " " + AL.UserOS + " " + (DateTime.FromDouble(AL.Stamp)).ToString);
        Debug.Indent;
        AO := Log.OpenOperations(AL.Session);
        
While Not AO.Eof Do
            Debug.WriteLine(
"Operation: " + AO.Name + "; Object:" + AO.ObjectId + "; Operation number:" + AO.Operation.ToString);
            AO.Next;
        
End While;
        AL.Next;
        Debug.Unindent;
    
End While;
    Lic := 
Null;
End Sub UserProc;

After executing the example the console displays all actions with specific object classes by the specified operations beginning with the specific date (11.01.2019).

See also:

IAuditFilterCondition