Description: String;
Description: System.String;
The Description property determines the description, that is used in the text of a label placed in the right upper corner of the first sheet when marking the objects during the objects export and printing.
If the description is empty, the security level name is used when marking.
To execute the example, make sure that mandatory access control contains category and security levels.
Add links to the Metabase, ForeSystem (for the Fore.NET example) system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
PO: IMetabasePolicy;
MA: IMetabaseMandatoryAccess;
Ctgr: ISecurityCategory;
SecLvl: ISecurityLevel;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
PO := MS.Policy;
MA := PO.MandatoryAccess;
// Change security level of the first category
Ctgr := MA.Category(0);
SecLvl := Ctgr.Level(1);
Debug.WriteLine(SecLvl.Name);
SecLvl.Description := "Restricted access";
SecLvl.Marking := True; // mark objects on export and print
SecLvl.TreatSectionAsDocument := True; // consider document section as single document
// Save changes
MS.Apply;
// Check in license
Lic := Null;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.ForeSystem;
…
Public Shared Sub Main(Params : StartParams);
Var
MB: IMetabase;
MS: IMetabaseSecurity;
PO: IMetabasePolicy;
MA: IMetabaseMandatoryAccess;
Ctgr: ISecurityCategory;
SecLvl: ISecurityLevel;
Lic: Object;
Begin
MB := Params.Metabase;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
MS := MB.Security;
PO := MS.Policy;
MA := PO.MandatoryAccess;
// Change security level of the first category
Ctgr := MA.Category[0];
SecLvl := Ctgr.Level[1];
System.Diagnostics.Debug.WriteLine(SecLvl.Name);
SecLvl.Description := "Restricted access";
SecLvl.Marking := True; // mark objects on export and print
SecLvl.TreatSectionAsDocument := True; // consider document section as single document
// Save changes
MS.Apply();
// Check in license
Lic := Null;
End Sub;
After executing the example, security level parameters of the first category are changed.
See also: