OpenNavigator Command

Purpose

Opens security manager for the specified repository.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to specify an array of the Variant type in this property, the elements of this array contain the following values:

Parameter Description
Element 1: IUiSecManagerParams Parameter determining display settings and section editing options. Contains settings of the repository, for which security manager should be opened.

Application Features

It is used to open security manager window for a repository. If a repository (value of the IUiSecManagerParams.Metabase property is equal to Null) is not determined in parameters, the result of command work will be opened security manager without connection to a repository.

Parameters can be used to hide sections, open sections in read-only mode, prohibit policy saving, disable controls.

Visibility and reading settings are set up using tab displaying parameter properties: IUISecManagerTabParams.ReadOnly and IUISecManagerTabParams.Visible.

Example

Executing the example requires a form and the Button1 button on the form.

Add links to the Metabase, Ui assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
    SecParams: IUiSecManagerParams;
Begin
    Target := WinApplication.Instance.GetPluginTarget("Adm");
    Context := Target.CreateExecutionContext;
    SecParams := new UiSecManagerParams.Create;
    SecParams.Metabase := MetabaseClass.Active; // 1. Set repository
    //Tab parameters
    SecParams.EnablePolicySave(False); // 2. Prohibit policy saving
    SecParams.Privilege.Visible := False// 3. Hide the Privileges, Mandatory Access, Object Classes and Security Violation Monitoring tabs
    SecParams.Mandatory.Visible := False;
    SecParams.Classes.Visible := False;
    SecParams.SecurityWatch.Visible := 
False;
    SecParams.Service.ReadOnly:= True;
// 4. Enable the Read Only mode for the Service tab
    SecParams.RepositoryMenuEnabled := False// 5. Disable items in the Repository menu (except the Disable and Exit items)
    SecParams.ServiceMenuEnabled := False// 6. Disable items in the Service menu
    SecParams.Users.ObjectRightsEnabled := False// 7. For the Users tab, disable to select the dialog box with object properties
    //Call a security manager
    Context.Data := SecParams;
    Target.Execute("OpenNavigator", Context);
End Sub Button1OnClick;

Clicking the button opens security manager dialog box with particular settings: a part of sections will not be available, policy changing will be prohibited.

See also:

IUiCommandTarget.Execute