IMetabasePolicy.RestrictGroupDeletion

Fore Syntax

RestrictGroupDeletion: Boolean;

Fore.NET Syntax

RestrictGroupDeletion: System.Boolean;

Description

The RestrictGroupDeletion property determines whether the deletion of groups is allowed if the group has effective permissions for the repository objects.

Comments

By default the property has the False value and deletion of groups is enabled.

To save new value it is necessary to apply the security policy. To do this use the IMetabaseSecurity.Apply property.

Fore Example

To execute the example, add a link to the Metabase system assembly.

Sub Main;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Police: IMetabasePolicy;
Begin
    MB := MetabaseClass.Active;
    MS := MB.Security;
    Police := MS.Policy;
    Police.RestrictGroupDeletion := True;
    MS.Apply;
End Sub Main;

After executing the example it is impossible to delete the group has the rules for the repository objects.

Fore.NET Example

To execute the example, add a link to the Metabase system assembly.

Imports Prognoz.Platform.Interop.Laner;
...
Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    SecSub: ISecuritySubject;
Begin
    MB := Params.Metabase;
    MS := MB.Security;
    Police := MS.Policy;
    Police.RestrictGroupDeletion := True;
    MS.Apply();
End Sub;

After executing the example it is impossible to delete the group has the rules for the repository objects.

See also:

IMetabasePolicy