SupportUserPrivateFolder: Boolean;
SupportUserPrivateFolder: Boolean;
The SupportUserPrivateFolder property determines the use of the mechanism of private folders of users.
Executing the example requires a form with a button. Add a link to the Metabase system assembly. The example is an event handler for a button.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
MS: IMetabaseSecurity;
MPolicy: IMetabasePolicy;
Begin
MB := MetabaseClass.Active;
MS := MB.Security;
MPolicy := MS.Policy;
// Enabling mechanism of users' private folders
MPolicy.SupportUserPrivateFolder := True;
// Return identifier of the folder containing users' private folders
Button1.text := MPolicy.UserPrivateFolderRoot.Id;
End Sub Button1OnClick;
After executing the example the mechanism of users' private folders is enabled, and identifier of the folder containing users' private folders is passed to button text.
The Fore.NET Example matches with that of the Fore Example.
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
MB: IMetabase;
MS: IMetabaseSecurity;
MPolicy: IMetabasePolicy;
Begin
MB := Self.Metabase;
MS := MB.Security;
MPolicy := MS.Policy;
// Enabling mechanism of users' private folders
MPolicy.SupportUserPrivateFolder := True;
// Return identifier of the folder containing users' private folders
Button1.text := MPolicy.UserPrivateFolderRoot.Id;
End Sub;
See also: