
			sendRedirect(actionRequest, actionResponse);
		}
		catch (Exception e) {
			if (e instanceof PrincipalException) {
				SessionErrors.add(actionRequest, e.getClass().getName());

				setForward(actionRequest, "portlet.sites_admin.error");
			}
			else {
				throw e;
			}
		}
	}

	@Override
	public ActionForward render(
			ActionMapping mapping, ActionForm form, PortletConfig portletConfig,
			RenderRequest renderRequest, RenderResponse renderResponse)
		throws Exception {

		try {
			ActionUtil.getGroup(renderRequest);
			ActionUtil.getRole(renderRequest);

			Role role = (Role)renderRequest.getAttribute(WebKeys.ROLE);

			if (role != null) {
				String name = role.getName();

				if (name.equals(RoleConstants.ORGANIZATION_USER) ||
					name.equals(RoleConstants.SITE_MEMBER)) {

					throw new NoSuchRoleException();
				}
			}
		}
		catch (Exception e) {
			if (e instanceof NoSuchGroupException ||
				e instanceof NoSuchRoleException ||
				e instanceof PrincipalException) {

				SessionErrors.add(renderRequest, e.getClass().getName());

				return mapping.findForward("portlet.sites_admin.error");
			}
			else {
				throw e;
			}
		}
