IsObjectLabelSupported: Boolean;
IsObjectLabelSupported: boolean;
The IsObjectLabelSupported property returns whether a criticality label, corresponding to an access level, is set for the object, on which the operation is executed.
If the criticality label is selected for an object property returns True, otherwise - False.
To execute the example, add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
AL: IAuditLog;
ALogon: IAuditLogons;
Operat: IAuditOperations;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
// Open access protocol
Al:=MS.OpenAuditLog;
ALogon:= AL.OpenLogons(False);
ALogon.Next;
Operat:=Al.OpenOperations(ALogon.Session);
If Operat.IsObjectLabelSupported Then
Debug.Writeline ("Criticality label is set");
Else
Debug.Writeline ("Criticality label is not set");
End If;
// Check in license
Lic := Null;
End Sub UserProc;
Imports Prognoz.Platform.Interop.ForeSystem;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MS: IMetabaseSecurity;
AL: IAuditLog;
ALogon: IAuditLogons;
Operat: IAuditOperations;
Lic: Object;
Begin
MB := Params.Metabase;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
MS := MB.Security;
// Open access protocol
Al:=MS.OpenAuditLog();
ALogon:= AL.OpenLogons(False);
ALogon.Next();
Operat:=Al.OpenOperations(ALogon.Session);
If Operat.IsObjectLabelSupported Then
System.Diagnostics.Debug.Writeline ("Criticality label is set");
Else
System.Diagnostics.Debug.Writeline ("Criticality label is not set");
End If;
// Check in license
Lic := Null;
End Sub;
After executing the example, the console displays the result of criticality label definition that was used for the last operation.
See also: