RestrictGroupDeletion: Boolean;
The RestrictGroupDeletion property determines whether the deletion of groups is allowed if the group has effective permissions for repository objects.
The property is set to False by default, groups can be deleted.
To save a new value, apply security policy using the IMetabaseSecurity.Apply property.
To execute the example, add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
Isa: IMetabaseUser;
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;
// Prohibit group deletion
Police.RestrictGroupDeletion := True;
// Save changes
MS.Apply;
// Check in license
Lic := Null;
End Sub UserProc;
After executing the example it is impossible to delete the group if it has permissions for repository objects.
See also: