IMetabasePolicy.RootObject

Fore Syntax

RootObject: IMetabaseObjectDescriptor;

Fore.NET Syntax

RootObject: Prognoz.Platform.Interop.Metabase.IMetabaseObjectDescriptor;

Description

The RootObject property determines the folder which will be the root on logging in the repository.

Comments

As the value of the property it is necessary to specify the description of one of the repository folders.

Selected folder is used as the root folder of repository if logging by the user which is not an administrator or information security administrator (ISA).

By default the property is set to Null, and the user can access the entire repository.

NOTE. To access the objects the user must have the appropriate permissions.

Fore Example

Executing the example requires that the repository contains a folder with the ROOT_PROJECT_FOLDER identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    MU: IMetabasePolicy;
Begin
    MB := MetabaseClass.Active;
    MS := MB.Security;
    MU := MS.Policy;
    MU.RootObject := Mb.ItemById("ROOT_PROJECT_FOLDER");
    MS.Apply;
End Sub UserProc;

On executing the example the repository security policy will be changed. The root folder will be specified for the repository.

Fore.NET Example

Executing the example requires that the repository contains a folder with the ROOT_PROJECT_FOLDER identifier. The specified procedure is an entry point for the .NET assembly.

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    MU: IMetabasePolicy;
Begin
    MB := Params.Metabase;
    MS := MB.Security;
    MU := MS.Policy;
    MU.RootObject := Mb.ItemById["ROOT_PROJECT_FOLDER"];
    MS.Apply();
End Sub;

On executing the example the repository security policy will be changed. The root folder will be specified for the repository.

See also:

IMetabasePolicy