Author: hfnukal
Date: 2011-04-13 02:43:12 -0400 (Wed, 13 Apr 2011)
New Revision: 6199
Modified:
epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/index.jsp
Log:
JBEPP-599: Deleting current portal caused redirect to default portal in public mode
Modified: epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/index.jsp
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/index.jsp 2011-04-12
20:10:45 UTC (rev 6198)
+++ epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/index.jsp 2011-04-13
06:43:12 UTC (rev 6199)
@@ -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() + "/");
%>
Show replies by date