X-Git-Url: https://gerrit.onap.org/r/gitweb?p=portal.git;a=blobdiff_plain;f=portal-BE%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportal%2Futils%2FEPUserUtils.java;h=fea71337a90e5ca3577fe8f18fbb3e2fcf10168e;hp=968e64f4d38d3c3e91d47cc0ad1d1f78f164c22e;hb=ffd9af970318c1f5a0bad46d7aad5d4611414aae;hpb=39fb119cdaea6bd8d801b22d195db39f6d8faaca diff --git a/portal-BE/src/main/java/org/onap/portal/utils/EPUserUtils.java b/portal-BE/src/main/java/org/onap/portal/utils/EPUserUtils.java index 968e64f4..fea71337 100644 --- a/portal-BE/src/main/java/org/onap/portal/utils/EPUserUtils.java +++ b/portal-BE/src/main/java/org/onap/portal/utils/EPUserUtils.java @@ -61,6 +61,7 @@ import org.onap.portal.domain.db.fn.FnRole; import org.onap.portal.domain.db.fn.FnRoleComposite; import org.onap.portal.domain.db.fn.FnUser; import org.onap.portal.domain.db.fn.FnUserRole; +import org.onap.portal.domain.dto.transport.Role; import org.onap.portal.exception.RoleFunctionException; import org.onap.portal.service.fn.old.EPRoleFunctionService; import org.onap.portalsdk.core.domain.RoleFunction; @@ -253,7 +254,7 @@ public class EPUserUtils { for (FnUserRole epUserApp : user.getUserApps()) { FnRole role = epUserApp.getRoleId(); - if (role.getActiveYn() && role.getRoleId().equals(ACCOUNT_ADMIN_ROLE_ID)) { + if (role.getActiveYn() && role.getId().equals(ACCOUNT_ADMIN_ROLE_ID)) { roles.put(role.getId(), role); // let's take a recursive trip down the tree to add all child @@ -273,7 +274,10 @@ public class EPUserUtils { */ @SuppressWarnings({"rawtypes", "unchecked"}) private static void addChildRoles(FnRole role, HashMap roles) { - Set childRoles = role.getChildRoles().stream().map(FnRoleComposite::getChildRoles).collect(Collectors.toSet()); + List childRoles = role.getChildRoles() + .stream() + .map(FnRoleComposite::getChildRoles) + .collect(Collectors.toList()); if (!childRoles.isEmpty()) { for (Object o : childRoles) { FnRole childRole = (FnRole) o;