[gatein-commits] gatein SVN: r4998 - portal/branches/branch-GTNPORTAL-1643/web/portal/src/main/webapp.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Nov 10 00:00:44 EST 2010
Author: ndkhoiits
Date: 2010-11-10 00:00:42 -0500 (Wed, 10 Nov 2010)
New Revision: 4998
Modified:
portal/branches/branch-GTNPORTAL-1643/web/portal/src/main/webapp/index.jsp
Log:
GTNPORTAL-1613 Redirect to private mode if user logged instead of public mode
Modified: portal/branches/branch-GTNPORTAL-1643/web/portal/src/main/webapp/index.jsp
===================================================================
--- portal/branches/branch-GTNPORTAL-1643/web/portal/src/main/webapp/index.jsp 2010-11-10 04:53:36 UTC (rev 4997)
+++ portal/branches/branch-GTNPORTAL-1643/web/portal/src/main/webapp/index.jsp 2010-11-10 05:00:42 UTC (rev 4998)
@@ -22,8 +22,14 @@
<%@ page import="org.exoplatform.container.PortalContainer"%>
<%@ page import="org.exoplatform.portal.config.UserPortalConfigService"%>
<%
- PortalContainer manager = PortalContainer.getCurrentInstance(session.getServletContext()) ;
- UserPortalConfigService userPortalConfigService = (UserPortalConfigService) manager.getComponentInstanceOfType(UserPortalConfigService.class) ;
- response.sendRedirect(request.getContextPath() + "/public/"+userPortalConfigService.getDefaultPortal()+"/");
+ PortalContainer manager = PortalContainer.getCurrentInstance(session.getServletContext());
+ UserPortalConfigService userPortalConfigService = (UserPortalConfigService)manager.getComponentInstanceOfType(UserPortalConfigService.class);
+ String remoteUser = request.getRemoteUser();
+ String accessMode = "public";
+ if (remoteUser != null && remoteUser.trim().length() > 0)
+ {
+ accessMode = "private";
+ }
+ response.sendRedirect(request.getContextPath() + "/" + accessMode + "/" + userPortalConfigService.getDefaultPortal() + "/");
%>
More information about the gatein-commits
mailing list