summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-01-22 03:57:28 (EST)
committer Sven Rottstock2013-01-22 03:57:28 (EST)
commit155342b48c756e47bdc6472f20339bb018ddc5ef (patch)
treeccb1b9c3ac6533df9df13d7aa62e037ad7f5fb0e
parentc3fea162ca3947216a367cd697b7a38cefac527a (diff)
downloadorg.eclipse.stardust.ui.web-155342b48c756e47bdc6472f20339bb018ddc5ef.zip
org.eclipse.stardust.ui.web-155342b48c756e47bdc6472f20339bb018ddc5ef.tar.gz
org.eclipse.stardust.ui.web-155342b48c756e47bdc6472f20339bb018ddc5ef.tar.bz2
Jira-ID: CRNT-26973
Made changes to call ippPortalLogout on invalid return URL git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@62228 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/login/dialogs/LoginDialogBean.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/login/dialogs/LoginDialogBean.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/login/dialogs/LoginDialogBean.java
index 446f1f4..3d3c93b 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/login/dialogs/LoginDialogBean.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/login/dialogs/LoginDialogBean.java
@@ -13,7 +13,7 @@ package org.eclipse.stardust.ui.web.viewscommon.login.dialogs;
import java.io.IOException;
import java.io.Serializable;
import java.util.Collections;
-import java.util.Iterator;
+
import java.util.List;
import java.util.Map;
@@ -32,8 +32,6 @@ import org.eclipse.stardust.ui.web.common.util.FacesUtils;
import org.eclipse.stardust.ui.web.common.util.MessagePropertiesBean;
import org.eclipse.stardust.ui.web.common.util.StringUtils;
import org.eclipse.stardust.ui.web.viewscommon.common.Constants;
-import org.eclipse.stardust.ui.web.viewscommon.common.Localizer;
-import org.eclipse.stardust.ui.web.viewscommon.common.LocalizerKey;
import org.eclipse.stardust.ui.web.viewscommon.common.PortalPluginSkinResourceResolver;
import org.eclipse.stardust.ui.web.viewscommon.common.TechnicalUserUtils;
import org.eclipse.stardust.ui.web.viewscommon.beans.ApplicationContext;
@@ -46,9 +44,10 @@ import org.springframework.beans.factory.InitializingBean;
public class LoginDialogBean implements Serializable, InitializingBean
{
private static final long serialVersionUID = -2703702864230398366L;
-
+
protected static final Logger trace = LogManager.getLogger(LoginDialogBean.class);
+ private final static String DEFAULT_LOGIN_PAGE = "plugins/views-common/login.iface";
public static final String DEFAULT_LOGIN_SKIN_CSS_NAME = "login.css";
public static final String LOGIN_SKIN_CSS_PARAM = "Carnot.Login.Skin.StyleSheet";
@@ -309,7 +308,14 @@ public class LoginDialogBean implements Serializable, InitializingBean
String returnUrl = FacesUtils.getQueryParameterValue(InfinityStartup.RETURN_URL_PARAM);
if (!StringUtils.isEmpty(returnUrl))
- {
+ {
+ // When returnUrl contains login.iface, clear current session and redirect to
+ // login Page
+ if (returnUrl.contains(DEFAULT_LOGIN_PAGE))
+ {
+ SessionContext.findSessionContext().logout();
+ return "ippPortalLogout";
+ }
FacesUtils.sendRedirect(returnUrl);
return null;
}