summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-BE-common')
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/FunctionalMenuController.java3
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/FunctionalMenuControllerTest.java2
2 files changed, 4 insertions, 1 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/FunctionalMenuController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/FunctionalMenuController.java
index 65abc280..abbd854a 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/FunctionalMenuController.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/FunctionalMenuController.java
@@ -575,10 +575,12 @@ public class FunctionalMenuController extends EPRestrictedBaseController {
String lastNameStr = null;
String emailStr = null;
String lastLogin = null;
+ boolean isSystemUser = false;
EPUser user = EPUserUtils.getUserSession(request);
firstNameStr = user.getFirstName();
lastNameStr = user.getLastName();
orgUserIdStr = user.getOrgUserId();
+ isSystemUser = user.isSystemUser();
emailStr = user.getEmail();
if (emailStr == null || emailStr.equals("")) {
EPUser userResult = searchService.searchUserByUserId(orgUserIdStr);
@@ -622,6 +624,7 @@ public class FunctionalMenuController extends EPRestrictedBaseController {
map.put("userId",
orgUserIdStr != null ? orgUserIdStr : (orgUserIdSC != null ? orgUserIdSC.getCvalue() : null));
map.put("last_login", lastLogin);
+ map.put("isSystemUser", String.valueOf(isSystemUser));
JSONObject j = new JSONObject(map);
fnMenuStaticResponse = j.toString();
// Be chatty in the log
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/FunctionalMenuControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/FunctionalMenuControllerTest.java
index bee5d932..80099d57 100644
--- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/FunctionalMenuControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/FunctionalMenuControllerTest.java
@@ -292,7 +292,7 @@ public class FunctionalMenuControllerTest extends MockitoTestSuite {
@Test
public void getFunctionalMenuStaticInfoTest(){
String fnMenuStaticactualResponse = null;
- String fnMenuStaticexpectedResponse = "{\"firstName\":\"test\",\"lastName\":\"test\",\"last_login\":\"09/08/2017 03:48:13 -0400 am\",\"userId\":\"guestT\",\"email\":\"test\"}";
+ String fnMenuStaticexpectedResponse = "{\"firstName\":\"test\",\"lastName\":\"test\",\"last_login\":\"09/08/2017 03:48:13 -0400 am\",\"userId\":\"guestT\",\"isSystemUser\":\"false\",\"email\":\"test\"}";
String orgUserIdStr = null;
EPUser user = mockUser.mockEPUser();