From 05af2c42b57d71d375ba2e50fd10a3fd682ea226 Mon Sep 17 00:00:00 2001 From: Sudarshan Kumar Date: Mon, 20 Jul 2020 13:42:49 +0530 Subject: Integrated UI lazy loading and Raptor update Integrated UI lazy loading and Raptor update Issue-ID: PORTAL-902 Change-Id: I0cf9f22a57c2be4e5b83981bdf0984768a5f44a6 Signed-off-by: Sudarshan Kumar --- .../org/onap/portalsdk/core/auth/LoginStrategy.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'ecomp-sdk/epsdk-core/src/main') diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/auth/LoginStrategy.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/auth/LoginStrategy.java index a1a415c0..fc415888 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/auth/LoginStrategy.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/auth/LoginStrategy.java @@ -48,6 +48,7 @@ import javax.servlet.http.HttpServletResponse; import org.onap.portalsdk.core.command.LoginBean; import org.onap.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.portalsdk.core.menu.MenuProperties; import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler; @@ -69,6 +70,7 @@ public abstract class LoginStrategy { public static final String EP_SERVICE = "EPService"; public static final String USER_ID = "UserId"; public static final String ERROR_MESSAGE_KEY = "error"; + private String welcomeView; @Autowired private LoginService loginService; @@ -107,9 +109,23 @@ public abstract class LoginStrategy { SystemProperties.getProperty(SystemProperties.LOGIN_METHOD_BACKDOOR), roleFunctionList); initateSessionMgtHandler(request); // user has been authenticated, now take them to the welcome page - return new ModelAndView("redirect:welcome"); + //return new ModelAndView("redirect:welcome"); + + // if user has been authenticated, now take them to the welcome page. + if (getWelcomeView() == null || getWelcomeView().equals("")) + return new ModelAndView("redirect:" + DEFAULT_SUCCESS_VIEW); + else + return new ModelAndView("redirect:" + getWelcomeView()); } } + + public String getWelcomeView() { + return welcomeView; + } + + public void setWelcomeView(String welcomeView) { + this.welcomeView = welcomeView; + } protected void invalidateExistingSession(HttpServletRequest request) { request.getSession().invalidate(); -- cgit 1.2.3-korg