IMetabaseAuditPolicy.FilterClass

Syntax

FilterClass(ClassID: Integer): Integer;

Parameters

ClassId. Number identifier of object class. Use the values of the MetabaseObjectClass enumeration to specify a class of the object.

Description

The FilterClass property determines a mask of operations for which the access auditing will be executed.

Comments

Access auditing by specified operations will be executed for all objects of the specified class. Auditing of operations that were activated for the classes, is more priority than the auditing of operations, the were deactivated for the particular object. The AddAce method and the AccessMask property are used to set the access of the operations auditing for the particular object.

To form and check mask value it is necessary to use a value of the enumeration type MetabaseObjectPredefinedRights. This enumeration contains basic and additional operations on which permissions can be given and access audit can be led. The specific operations are available for defined classes of objects. Depending on the class of object, the values of the following enumerations can be used in the mask:

Basic, additional and specific operations available for specified objects types are shown in the Types of Events section.

To analyze a mask value it is necessary to implement a custom function that enables the comparison of separate mask bits with relevant enumerations values. The example of work with access mask is shown in the Examples: Working with Access Mask section.

Example

Below is an example of the auditing change for the determined class of object.

    Sub UserProc;
    Var
        Security: IMetabaseSecurity;
        AuditPolicy: IMetabaseAuditPolicy;
        mask: integer;
    Begin
        Security := MetabaseClass.Active.Security;
        AuditPolicy := Security.Policy.AuditPolicy;
        AuditPolicy.FilterClass(MetabaseObjectClass.KE_CLASS_SHORTCUT_AUDIT) := MetabaseObjectPredefinedRights.Write;
        Security.Apply;
    End Sub UserProc;

After executing the example the audit of the shortcuts in the change mode is enabled.

See also:

IMetabaseAuditPolicy