diff options
author | Kishore Reddy, Gujja (kg811t) <kg811t@research.att.com> | 2018-08-07 17:08:55 -0400 |
---|---|---|
committer | Kishore Reddy, Gujja (kg811t) <kg811t@research.att.com> | 2018-08-07 17:08:55 -0400 |
commit | 9ddac93ed79931d674d1b877661a0f7611d3a7d9 (patch) | |
tree | 117c9efd7280e2155096af932e27faead0520ed7 /ecomp-sdk/epsdk-aaf/src | |
parent | 40a17c1d7e5f0edca350a49210e16223a875d290 (diff) |
Adding User Auth and permission aaf services
Issue-ID: PORTAL-334
Change-Id: Iee2e7e6a2e944ed60708a81c706977628d84ac39
Signed-off-by: Kishore Reddy, Gujja (kg811t) <kg811t@research.att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-aaf/src')
-rw-r--r-- | ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/UserApiServiceImpl.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/UserApiServiceImpl.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/UserApiServiceImpl.java index bfe9808b..3eac97b5 100644 --- a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/UserApiServiceImpl.java +++ b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/UserApiServiceImpl.java @@ -128,7 +128,7 @@ public class UserApiServiceImpl implements UserApiService { HttpMethod.GET, entity, String.class); if (getResponse.getStatusCode().value() == 200) { logger.debug(EELFLoggerDelegate.debugLogger, - "getUserRoles: Finished GET unp ser roles from external auth system and body: {}", + "getUserRoles: Finished GET user app roles from external auth system and body: {}", getResponse.getBody()); } String userRoles = getResponse.getBody(); @@ -162,9 +162,7 @@ public class UserApiServiceImpl implements UserApiService { if (!role.getString(EcompExternalAuthUtils.EXT_ROLE_FIELD_NAME) .endsWith(EcompExternalAuthUtils.EXT_ROLE_FIELD_ADMIN) && !role.getString(EcompExternalAuthUtils.EXT_ROLE_FIELD_NAME) - .endsWith(EcompExternalAuthUtils.EXT_ROLE_FIELD_OWNER) - && EcompExternalAuthUtils.checkNameSpaceMatching( - role.getString(EcompExternalAuthUtils.EXT_ROLE_FIELD_NAME), namespace)) { + .endsWith(EcompExternalAuthUtils.EXT_ROLE_FIELD_OWNER)) { ExternalRoleDescription desc = new ExternalRoleDescription(); if (role.has(EcompExternalAuthUtils.EXT_FIELD_DESCRIPTION) && EcompExternalAuthUtils .isJSONValid(role.getString(EcompExternalAuthUtils.EXT_FIELD_DESCRIPTION))) { @@ -225,7 +223,7 @@ public class UserApiServiceImpl implements UserApiService { if (roleDesc != null) { if (roleDesc.getName() == null) { role.setActive(true); - role.setName(userRoleDetail.getName().substring(namespace.length() + 1)); + role.setName(userRoleDetail.getName()); } else { role.setActive(Boolean.valueOf(roleDesc.getActive())); role.setId(Long.valueOf(roleDesc.getAppRoleId())); |