RootObject: IMetabaseObjectDescriptor;
The RootObject property determines the folder, which will be the root one on logging in the repository.
As a property value, specify description of one of the repository folders.
The specified folder is used as the root folder of repository if login was executed by the user who is not an administrator or information security administrator (ISA).
The property is set to Null by default, and the user can access the entire repository.
NOTE. To access the objects the user must have the appropriate permissions.
Executing the example requires that the repository contains a folder with the ROOT_PROJECT_FOLDER identifier.
Add a link to the Metabase system assembly.
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;
After executing the example the root folder will be set for repository.
See also: