IMetabaseObject.EditRequiresAdditionalLicense

Syntax

EditRequiresAdditionalLicense: String;

Description

The EditRequiresAdditionalLicense property determines a name of application feature to protect repository objects from editing.

Comments

Editing protection is available for the repository objects: resources, assembly, form, unit.

The property is set to Null by default. If a property value is set, it is additionally checked on repository object editing if there is an application feature with corresponding name.

To view available features, use license manager, the About window or the ILicenseManager.GetAllFeatures method.

Features of property use:

To set up repository objects protection from editing, also use the Objects Protection from Editing dialog box.

To work with application features, see the Protecting Application Systems article.

Example

Executing the example requires a form with the following components:

Add links to the Metabase, Forms system assemblies.

The example is a handler of the OnClick event for the Button1 and Button2 components.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Mb: IMetabase;
    Obj: IMetabaseObjectDescriptor;
Begin
    Mb := MetabaseClass.Active;
    Obj := Mb.ItemById(EditBox1.Text);
    EditBox2.Text := Obj.Bind.EditRequiresAdditionalLicense;
End Sub Button1OnClick; 

Sub Button2OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Mb: IMetabase;
    Obj: IMetabaseObjectDescriptor;
    Lic: IMetabaseObject;
Begin
    Mb := MetabaseClass.Active;
    Obj := Mb.ItemById(EditBox1.Text);
    Lic := Obj.Edit;
    Lic.EditRequiresAdditionalLicense := EditBox2.Text;     
    Lic.Save;
End Sub Button2OnClick;

After executing the example enter repository object identifier in the EditBox1 component and click the Button1 button. An application feature name is obtained and is displayed in the EditBox2 component if the object is protected from editing. If the object is protected from editing with an application feature, to enable protection enter application feature name in the EditBox2 component and click the Button2 button. The specified repository object will be protected from editing with the application feature.

See also:

IMetabaseObject