* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
PortalRestResponse<String> portalResponse = new PortalRestResponse<>();
StringBuilder sbUserApps = new StringBuilder();
if (newAppRolesForUser != null) {
PortalRestResponse<String> portalResponse = new PortalRestResponse<>();
StringBuilder sbUserApps = new StringBuilder();
if (newAppRolesForUser != null) {
- sbUserApps.append("User '" + newAppRolesForUser.orgUserId);
- if (newAppRolesForUser.appRoles != null && newAppRolesForUser.appRoles.size() >= 1) {
+ sbUserApps.append("User '" + newAppRolesForUser.getOrgUserId());
+ if (newAppRolesForUser.getAppId() != null && !newAppRolesForUser.getAppRoles().isEmpty()) {
if (appRole.isApplied) {
sbUserApps.append(appRole.roleName + " ,");
}
}
sbUserApps.deleteCharAt(sbUserApps.length() - 1);
if (appRole.isApplied) {
sbUserApps.append(appRole.roleName + " ,");
}
}
sbUserApps.deleteCharAt(sbUserApps.length() - 1);
}
}
logger.info(EELFLoggerDelegate.applicationLogger, "putAppWithUserRoleStateForUser: {}", sbUserApps.toString());
}
}
logger.info(EELFLoggerDelegate.applicationLogger, "putAppWithUserRoleStateForUser: {}", sbUserApps.toString());
try{
if (changesApplied.isResult()) {
logger.info(EELFLoggerDelegate.applicationLogger,
try{
if (changesApplied.isResult()) {
logger.info(EELFLoggerDelegate.applicationLogger,
- "putAppWithUserRoleStateForUser: succeeded for app {}, user {}", newAppRolesForUser.appId,
- newAppRolesForUser.orgUserId);
+ "putAppWithUserRoleStateForUser: succeeded for app {}, user {}", newAppRolesForUser.getAppId(),
+ newAppRolesForUser.getAppId());
MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());
AuditLog auditLog = new AuditLog();
auditLog.setUserId(user.getId());
auditLog.setActivityCode(EcompAuditLog.CD_ACTIVITY_UPDATE_USER);
MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());
AuditLog auditLog = new AuditLog();
auditLog.setUserId(user.getId());
auditLog.setActivityCode(EcompAuditLog.CD_ACTIVITY_UPDATE_USER);
auditLog.setComments(EcompPortalUtils.truncateString(sbUserApps.toString(), PortalConstants.AUDIT_LOG_COMMENT_SIZE));
auditService.logActivity(auditLog, null);
auditLog.setComments(EcompPortalUtils.truncateString(sbUserApps.toString(), PortalConstants.AUDIT_LOG_COMMENT_SIZE));
auditService.logActivity(auditLog, null);
logger.info(EELFLoggerDelegate.auditLogger,
EPLogUtil.formatAuditLogMessage("UserRolesController.putAppWithUserRoleStateForUser",
EcompAuditLog.CD_ACTIVITY_UPDATE_USER, user.getOrgUserId(),
logger.info(EELFLoggerDelegate.auditLogger,
EPLogUtil.formatAuditLogMessage("UserRolesController.putAppWithUserRoleStateForUser",
EcompAuditLog.CD_ACTIVITY_UPDATE_USER, user.getOrgUserId(),
MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);
MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);
MDC.remove(SystemProperties.MDC_TIMER);
MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);
MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);
MDC.remove(SystemProperties.MDC_TIMER);
- "putAppWithUserRoleStateForUser: failed for app {}, user {}", newAppRolesForUser.appId,
- newAppRolesForUser.orgUserId);
+ "putAppWithUserRoleStateForUser: failed for app {}, user {}", newAppRolesForUser.getAppId(),
+ newAppRolesForUser.getOrgUserId());