PortletDefinitionForm form = new PortletDefinitionForm();
final IEntityGroup portletCategoriesGroup = GroupService.getDistinguishedGroup(GroupService.PORTLET_CATEGORIES);
form.addCategory(new JsonEntityBean(portletCategoriesGroup, groupListHelper.getEntityType(portletCategoriesGroup)));
final IEntityGroup everyoneGroup = GroupService.getDistinguishedGroup(GroupService.EVERYONE);
JsonEntityBean everyoneBean = new JsonEntityBean(everyoneGroup, groupListHelper.getEntityType(everyoneGroup));
<BUG>form.addGroup(everyoneBean);
</BUG>
for (String activity : PORTLET_SUBSCRIBE_ACTIVITIES) {
form.addPermission(everyoneBean.getTypeAndIdHash() + "_" + activity);
}

PortletDefinitionForm form = new PortletDefinitionForm();
final IEntityGroup portletCategoriesGroup = GroupService.getDistinguishedGroup(GroupService.PORTLET_CATEGORIES);
form.addCategory(new JsonEntityBean(portletCategoriesGroup, groupListHelper.getEntityType(portletCategoriesGroup)));
final IEntityGroup everyoneGroup = GroupService.getDistinguishedGroup(GroupService.EVERYONE);
JsonEntityBean everyoneBean = new JsonEntityBean(everyoneGroup, groupListHelper.getEntityType(everyoneGroup));
form.addPrincipal(everyoneBean);
for (String activity : PORTLET_SUBSCRIBE_ACTIVITIES) {
form.addPermission(everyoneBean.getTypeAndIdHash() + "_" + activity);
}
