TrackClassHistory(ClassID: Integer): Integer;
TrackClassHistory[System.Int32]: System.Int32;
ClassId. Object class. To specify object class, use the MetabaseObjectClass enumeration.
The TrackClassHistory property determines a mask of operations for which the history will be tracked.
Only three following operations can track the history: Change, Rights change and Remove. To create and check mask value, use the MetabaseObjectPredefinedRights enumeration. To analyze a mask value 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 Working with Access Mask section.
Executing the example requires the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
AuditPolicy: IMetabaseAuditPolicy;
MBClass: Integer;
Begin
MB := MetabaseClass.Active;
MS := MB.Security;
AuditPolicy := MS.Policy.AuditPolicy;
MBClass := MetabaseObjectClass.KE_CLASS_FOLDER;
Debug.WriteLine(AuditPolicy.TrackClassHistory(MBClass));
End Sub UserProc;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.ForeSystem;
…
Public Shared Sub Main(Params : StartParams);
Var
MB: IMetabase;
MS: IMetabaseSecurity;
AuditPolicy: IMetabaseAuditPolicy;
MBClass: Integer;
Begin
MB := Params.Metabase;
MS := MB.Security;
AuditPolicy := MS.Policy.AuditPolicy;
MBClass := MetabaseObjectClass.KE_CLASS_FOLDER As Integer;
System.Diagnostics.Debug.WriteLine(AuditPolicy.TrackClassHistory[MBClass]);
End Sub;
After executing the example the value that determines the operations on folders for which the records will be added to the access protocol will be displayed to the console.
See also: