summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java
diff options
context:
space:
mode:
authorChristopher Lott (cl778h) <clott@research.att.com>2017-07-07 07:21:10 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-07-07 07:22:13 -0400
commit3e7145fc12ed8475ba10bb2a3c63004d41aa42bc (patch)
treec205d84c80e4786708caa705683a56de37c5ed2d /ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java
parent952895873b6179857c6773086a4d2b55f086bd61 (diff)
[PORTAL-25] Role Centralization
Bump EP SDK version to 1.3.0-SNAPSHOT Support Role Centralization & Common Set of Roles across All ONAP On-Boarded Applications Change-Id: Icfc1bbfddaf2c7c7176b4cf7bb7017d853c63100 Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java')
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java
index 9ffa1d1d..64ff160e 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java
@@ -22,6 +22,7 @@ package org.openecomp.portalapp.controller.core;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import javax.servlet.http.Cookie;
@@ -31,6 +32,7 @@ import javax.servlet.http.HttpSession;
import org.openecomp.portalsdk.core.auth.LoginStrategy;
import org.openecomp.portalsdk.core.command.LoginBean;
import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.RoleFunction;
import org.openecomp.portalsdk.core.domain.User;
import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.openecomp.portalsdk.core.menu.MenuProperties;
@@ -38,6 +40,7 @@ import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler;
import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants;
import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties;
import org.openecomp.portalsdk.core.service.LoginService;
+import org.openecomp.portalsdk.core.service.RoleService;
import org.openecomp.portalsdk.core.util.SystemProperties;
import org.openecomp.portalsdk.core.web.support.AppUtils;
import org.openecomp.portalsdk.core.web.support.UserUtils;
@@ -70,6 +73,9 @@ public class SingleSignOnController extends UnRestrictedBaseController {
public void setWelcomeView(String welcomeView) {
this.welcomeView = welcomeView;
}
+
+ @Autowired
+ RoleService roleService;
/**
* Handles requests directed to the single sign-on page by the session
@@ -102,6 +108,7 @@ public class SingleSignOnController extends UnRestrictedBaseController {
commandBean = getLoginService().findUser(commandBean,
(String) request.getAttribute(MenuProperties.MENU_PROPERTIES_FILENAME_KEY),
additionalParamsMap);
+ List<RoleFunction> roleFunctionList= roleService.getRoleFunctions(user.getLoginId());
if (commandBean.getUser() == null) {
String loginErrorMessage = (commandBean.getLoginErrorMessage() != null)
? commandBean.getLoginErrorMessage()
@@ -123,7 +130,7 @@ public class SingleSignOnController extends UnRestrictedBaseController {
loginMethod = SystemProperties.getProperty(SystemProperties.LOGIN_METHOD_WEB_JUNCTION);
}
UserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(),
- commandBean.getBusinessDirectMenu(), loginMethod);
+ commandBean.getBusinessDirectMenu(), loginMethod, roleFunctionList);
initateSessionMgtHandler(request);
logger.debug(EELFLoggerDelegate.debugLogger,
"singleSignOnLogin: create new user session for expired user {}; user {} exists in the system",