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();
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))) {
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()));