SupportUserPrivateFolder: Boolean;
SupportUserPrivateFolder: System.Boolean;
The SupportUserPrivateFolder property determines the use of the mechanism of private folders of users.
To execute the example, add links to the Metabase, ForeSystem (for the Fore.NET example) system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
Policy: IMetabasePolicy;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
Policy := MS.Policy;
// Enable using users private folders mechanism
Policy.SupportUserPrivateFolder := True;
// Display identifier of the folder containing users private folders to the console
Debug.WriteLine(Policy.UserPrivateFolderRoot.Id);
// 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;
Policy: IMetabasePolicy;
Lic: Object;
Begin
MB := Params.Metabase;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
MS := MB.Security;
Policy := MS.Policy;
// Enable using users private folders mechanism
Policy.SupportUserPrivateFolder := True;
// Display identifier of the folder containing users private folders to the console
System.Diagnostics.Debug.WriteLine(Policy.UserPrivateFolderRoot.Id);
// Save changes
MS.Apply();
// Check in license
Lic := Null;
End Sub;
After executing the example, the use of users private folders will be enabled. The console will display identifier of the folder containing users private folders.
See also: