Done ticket GEPAFINBE-76
This commit is contained in:
@@ -169,7 +169,7 @@ public class UserDao {
|
||||
}
|
||||
private BeneficiaryEntity createBeneficiary(RoleEntity roleEntity, UserReq userReq, HubEntity hub) {
|
||||
BeneficiaryEntity beneficiaryEntity = null;
|
||||
if (RoleStatusEnum.ROLE_BENEFICIARY.getValue().equals(roleEntity.getRoleType())) {
|
||||
if (RoleStatusEnum.ROLE_BENEFICIARY.getValue().equals(roleEntity.getRoleType()) || RoleStatusEnum.ROLE_CONFIDI.getValue().equals(roleEntity.getRoleType())) {
|
||||
beneficiaryEntity = new BeneficiaryEntity();
|
||||
beneficiaryEntity.setAddress(userReq.getAddress());
|
||||
beneficiaryEntity.setCity(userReq.getCity());
|
||||
@@ -765,7 +765,7 @@ public class UserDao {
|
||||
HubEntity hubEntity = hubService.valdateHub(userEntity.getHub().getId());
|
||||
String beneficiaryRoleType = RoleStatusEnum.ROLE_BENEFICIARY.getValue();
|
||||
|
||||
if (validator.checkIsBeneficiary()) {
|
||||
if (Boolean.TRUE.equals(validator.checkIsBeneficiary()) || Boolean.TRUE.equals(validator.checkIsConfidi())) {
|
||||
// Validate if the new email already exists for another beneficiary in the same hub
|
||||
boolean emailExistsForBeneficiary = userRepository.existsByEmailIgnoreCaseForBeneficiaries(
|
||||
userReq.getEmail(), hubEntity.getUniqueUuid(), beneficiaryRoleType);
|
||||
|
||||
Reference in New Issue
Block a user