Operation(Index: Integer): Integer;
Operation[Index: integer]: integer;
Index. index of a position of a determined operation.
The IAuditFilterCondition.OperationCount property determines the number of positions.
The Operation property determines operations that information is displayed in access protocol.
Operations values can coincide that is why to determine explicitly it is necessary to assign the object class for which data of the operation are displayed in access protocol.
To assign an operation 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. To use specific operations depending on the object class there is a possibility to use values of the following enumerations:
AuditLogSpecificRights are specific operations available for access protocol.
CalculatedCubeSpecificRights are specific operations available for calculated cubes
CubeLoaderSpecificRights are specific operations available for loading data in a cube
CubeSpecificRights are specific operations available for different types of cubes
CustomObjectSpecificRights are specific operations available for objects of custom classes
DataBaseSpecificRights are specific operations available for repository object - Database
DictionarySpecificRights are specific operations available for repository objects - MDM Dictionary and Composite MDM dictionary
MDCalcSpecificRights are specific operations available for repository object - Multidimensional calculation on DB server
ProblemSpecificRights are specific operations available for an object of modeling container - Modeling task
ProcedureSpecificRights are specific operations available for repository object - Procedure
ScenarioDimensionSpecificRights are specific operations available for the repository object - Modeling Scenario.
ScheduledTaskSpecificRights are specific operations available for tasks created in scheduled tasks container.
SecuritySpecificRights are specific operations available for security policy.
TableSpecificRights are specific operations available for the following repository objects - Table, View, Log, External table
UpdateObjectSpecificRights are specific operations available for repository object - Update.
ValidationSpecificRights are specific operations available for repository object - Validation rule and Validation group.
Basic, additional and specific operations available for specified objects types are shown in theLogged Operations section.
To execute the example, add links to the Metabase, ForeSystem (for the Fore.NET example) system assemblies.
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;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.ForeSystem;
…
Public Shared Sub Main(Params: StartParams);
Var
Mb: IMetabase;
Log: IAuditLog;
Fil: IAuditFilter;
Con: IAuditFilterCondition;
AL: IAuditLogons;
AO: IAuditOperations;
Lic: Object;
Begin
MB := Params.Metabase;
Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
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.moprCreate_ As Integer;
Con.OperationClass[0] := MetabaseObjectClass.KE_CLASS_METABASEUPDATEOBJECT;
Con.Operation[1] := (MetabaseObjectPredefinedRights.moprDelete As Integer) Or (MetabaseObjectPredefinedRights.moprCreate_ As Integer);
Con.OperationClass[1] := MetabaseObjectClass.KE_CLASS_FOLDER;
AL := Log.OpenLogons(False);
While Not AL.Eof() Do
System.Diagnostics.Debug.WriteLine(AL.UserName + " " + AL.UserOS + " " + (DateTime.FromOADate(AL.Stamp)).ToString());
System.Diagnostics.Debug.Indent();
AO := Log.OpenOperations(AL.Session);
While Not AO.Eof() Do
System.Diagnostics.Debug.WriteLine("Operation: " + AO.Name + "; Object:" + AO.ObjectId + "; Operation number:" + AO.Operation.ToString());
AO.Next();
End While;
AL.Next();
System.Diagnostics.Debug.Unindent();
End While;
Lic := Null;
End Sub;
After executing this example all actions with determined objects classes by specified operations beginning with the specific date (11.01.2019) are displayed in console.
See also: