From d34d992ac8df6a83cf691730a29d186b051cf0dd Mon Sep 17 00:00:00 2001 From: Muni Mohan Kunchi Date: Fri, 12 Jun 2020 14:51:05 -0400 Subject: fixes for non gui application Issue-ID: PORTAL-909 Signed-off-by: Muni Mohan Kunchi Change-Id: Ia006bc755760641c6501a531f95013d04c93427f --- .../onap/portalapp/portal/service/EPAppCommonServiceImpl.java | 3 ++- .../portalapp/portal/service/UserRolesCommonServiceImpl.java | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'ecomp-portal-BE-common/src/main/java/org') diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java index 539ada26..8319dab4 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java @@ -855,7 +855,8 @@ public class EPAppCommonServiceImpl implements EPAppService { public List getEnabledNonOpenOnboardingApps() { @SuppressWarnings("unchecked") List apps = dataAccessService.getList(EPApp.class, - " where enabled = true and open = false and id!=" + ECOMP_APP_ID, null, null); + " where enabled = true and open = false and app_type!= 3 and id!=" + ECOMP_APP_ID, null, null); + List onboardingAppsList = new ArrayList(); for (EPApp app : apps) { OnboardingApp onboardingApp = new OnboardingApp(); diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java index db860057..a97dc58b 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java @@ -1086,7 +1086,6 @@ public class UserRolesCommonServiceImpl { } } } - applyChangesToUserAppRolesForMyLoginsRequest(user, appId); Boolean systemUser = (newAppRolesForUser.getIsSystemUser() != null ? newAppRolesForUser.getIsSystemUser() : false); @@ -1114,7 +1113,10 @@ public class UserRolesCommonServiceImpl { } else{ // if centralized app if (app.getRolesInAAF()) { - if (!app.getId().equals(PortalConstants.PORTAL_APP_ID)) { + + if (!app.getId().equals(PortalConstants.PORTAL_APP_ID) && (app.getAppAck() != null && app.getAppAck())) { + logger.debug(EELFLoggerDelegate.debugLogger,"setAppWithUserRoleStateForUser: calling pushRemoteUser method for Central application"); + logger.debug(EELFLoggerDelegate.debugLogger,"setAppWithUserRoleStateForUser:"+app.getAppAck()); pushRemoteUser(roleInAppForUserList, userId, app, mapper, searchService, applicationsRestClientService,false); } @@ -1125,8 +1127,8 @@ public class UserRolesCommonServiceImpl { userRolesInLocalApp); List roleAppUserList = rolesInAppForUser.roles; if (EcompPortalUtils.checkIfRemoteCentralAccessAllowed()) { - - // Apply changes in external Access system + + // Apply changes in external Access system updateUserRolesInExternalSystem(app, rolesInAppForUser.orgUserId, roleAppUserList, epRequestValue,false,rolesGotDeletedFromApprover,checkIfUserisOnlyRoleAdmin); } -- cgit 1.2.3-korg