IMetabaseAuditPolicy.FilterClass

Syntax

FilterClass(ClassID: Integer): Integer;

Parameters

ClassId. Number identifier of object class.

Description

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

Comments

To specify object class in the ClassId parameter, use the MetabaseObjectClass enumeration type values.

Access auditing by the 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 theLogged Operations 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 given in the Working with Access Mask section.

Example

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

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    AuditPolicy: IMetabaseAuditPolicy;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    
// Change audit of the Shortcut object type
    AuditPolicy := MS.Policy.AuditPolicy;
    AuditPolicy.FilterClass(MetabaseObjectClass.KE_CLASS_SHORTCUT_AUDIT) := MetabaseObjectPredefinedRights.Write;
    
// Save changes
    MS.Apply;
    
// Check in license
    Lic := Null;
End Sub UserProc;

After executing the example the audit of the Shortcut object type in the change mode is enabled.

See also:

IMetabaseAuditPolicy