OrganizationService service = uiGroupManagement.getApplicationComponent(OrganizationService.class);
UserACL acl = uiGroupManagement.getApplicationComponent(UserACL.class);
List<String> mandatories = acl.getMandatoryGroups();
if (!mandatories.isEmpty() && isMandatory(service.getGroupHandler(), currentGroup, mandatories))
{
uiApp.addMessage(new ApplicationMessage("UIGroupManagement.msg.DeleteMandatory", null));
return;
}
String parentId = currentGroup.getParentId();
service.getGroupHandler().removeGroup(currentGroup, true);
uiGroupExplorer.changeGroup(parentId);