New in v4.2.1.7
Version 4.2.1.7 is a minor upgrade with numerous bug fixes and a few new features. The full set of changes can be found in the change log. The sections below provide an overview of the improvements.
- A new groovy script was added:
iamscripts/user-conversion/UserTypeConversion.groovy
. More on user conversion feature can be found in this document.
import org.openiam.esb.core.user.converter.AbstractUserConversionimport org.openiam.exception.BasicDataServiceExceptionimport org.openiam.idm.srvc.user.dto.Userclass UserTypeConversionPerformer extends AbstractUserConversion {/**available MQ services:MetadataTypeRabbitMQService metadataTypeRabbitMQService;UserRabbitMQService userRabbitMQService;RoleRabbitMQService roleRabbitMQService;GroupRabbitMQService groupRabbitMQService;OrganizationRabbitMQService organizationRabbitMQService;ResourceRabbitMQService resourceRabbitMQService;and context if you need other bean/@Overridevoid validateUserConversion(final User user, final User sourceUser, final String newTypeId) throws BasicDataServiceException {// MetadataType type = getMetadataTypeByNameAndGrouping("Default User", MetadataTypeGrouping.USER_OBJECT_TYPE)/if (user.getMdTypeId().equalsIgnoreCase("DEFAULT_USER") && "INTERNAL_USER".equals(newTypeId)) {BasicDataServiceException be = new BasicDataServiceException(ResponseCode.VALIDATION_ERROR);be.addErrorToken(new EsbErrorToken("openiam.ui.common.field.validation.error"))throw be}*/}@Overridevoid convertUserType(User targetUser, User sourceUser, String newMdType) throws BasicDataServiceException {// MetadataType type = getMetadataTypeByNameAndGrouping("Default User", MetadataTypeGrouping.USER_OBJECT_TYPE)/if (sourceUser != null) {if (CollectionUtils.isNotEmpty(sourceUser.getRoles())) {for (UserToRoleMembershipXref role : sourceUser.getRoles()) {targetUser.addRole(role.getEntityId())}}} else {BasicDataServiceException be = new BasicDataServiceException(ResponseCode.USER_CONVERSION_ERROR);be.addErrorToken(new EsbErrorToken("openiam.ui.selfservice.direct.reports.covert.user.error"))throw be}/}}
- Change done to the following script:
/bpm/CustomNotificationDelegate.groovy
.
package org.openiam.workflow.activiti.groovyimport org.openiam.idm.srvc.auth.dto.Loginimport org.openiam.idm.srvc.user.dto.NewUserProfileRequestModelimport org.openiam.idm.srvc.user.dto.Userclass CustomNotificationDelegate extends DefaultNotificationDelegate {@Overridevoid sendNotificationUserCentricRequest(User toNotify, User targetUserFromDb, Map<String, Object> executionValues, String processInstanceId) {super.sendNotificationUserCentricRequest(toNotify, targetUserFromDb, executionValues, processInstanceId)}@Overridevoid sendNotificationUserCentricRequest(User toNotify, User targetUserFromDb, Map<String, Object> executionValues, String notificationType, String processInstanceId) {super.sendNotificationUserCentricRequest(toNotify, targetUserFromDb, executionValues, notificationType, processInstanceId)}@Overridevoid sendNotification(User toNotify, User targetUser, Map<String, Object> executionValues, String processInstanceId) {super.sendNotification(toNotify, targetUser, executionValues, processInstanceId)}@Overridevoid sendNotification(User toNotify, User targetUser, Map<String, Object> executionValues, String notificationType, String processInstanceId) {super.sendNotification(toNotify, targetUser, executionValues, notificationType, processInstanceId)}@Overridevoid sendEmails(Map<String, Object> executionValues, User requestor, User newUser, String notificationType, Set<String> userIds, Set<String> emailAddresses, NewUserProfileRequestModel request) {super.sendEmails(executionValues, requestor, newUser, notificationType, userIds, emailAddresses, request)}@Overridevoid sendEmail(String notificationType, Map<String, Object> executionValues, User requester, User newUser, String userId, String email, String identity, String password, NewUserProfileRequestModel profileRequestModel) {super.sendEmail(notificationType, executionValues, requester, newUser, userId, email, identity, password, profileRequestModel)}@Overridevoid sendNotificationRequestNewHire(User user, User requester, Map<String, Object> executionValues, NewUserProfileRequestModel profileModel, String processInstanceId) {super.sendNotificationRequestNewHire(user, requester, executionValues, profileModel, processInstanceId)}@Overridevoid sendActivationLink(Map<String, Object> executionValues, User user, Login login) {super.sendActivationLink(executionValues, user, login)}}
- If you are using AD PowerShell connector update it to version 5.26 (the newest connector version is available in a release).
- There is a new url Pattern
/selfservice/create-new-group-request added
. You need to re-add the default patterns into existing content providers to add the new one.