PermissionChecker permissionChecker, long groupId,
Organization organization, String actionId)
throws PortalException, SystemException {
while ((organization != null) &&
(organization.getOrganizationId() !=
<BUG>OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID)) {
if (permissionChecker.hasPermission(
groupId, Organization.class.getName(),</BUG>
organization.getOrganizationId(), actionId)) {
return true;

PermissionChecker permissionChecker, long groupId,
Organization organization, String actionId)
throws PortalException, SystemException {
while ((organization != null) &&
(organization.getOrganizationId() !=
OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID)) {
if (actionId.equals(ActionKeys.ADD_ORGANIZATION) &&
permissionChecker.hasPermission(
groupId, Organization.class.getName(),
organization.getOrganizationId(),
ActionKeys.MANAGE_SUBGROUPS) ||
PortalPermissionUtil.contains(
permissionChecker, ActionKeys.ADD_COMMUNITY)) {
return true;
