IMetabasePolicy.RootObject

Syntax

RootObject: IMetabaseObjectDescriptor;

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.

Example

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

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;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    Policy := MS.Policy;
    
// Set root folder
    Policy.RootObject := Mb.ItemById("ROOT_PROJECT_FOLDER");
    
// 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;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
    MS := MB.Security;
    Policy := MS.Policy;
    
// Set root folder
    Policy.RootObject := 
Mb.ItemById["ROOT_PROJECT_FOLDER"];
    
// Save changes
    MS.Apply();
    
// Check in license
    Lic := Null;
End Sub;

After executing the example the root folder will be set for repository.

See also:

IMetabasePolicy