Done ticket GEPAFINBE-76
This commit is contained in:
@@ -389,7 +389,7 @@ public class ApplicationDao {
|
||||
return (root, query, builder) -> {
|
||||
Boolean isBeneficiary = validator.checkIsBeneficiary();
|
||||
Predicate predicate = builder.isFalse(root.get("isDeleted"));
|
||||
if (isBeneficiary) {
|
||||
if (Boolean.TRUE.equals(validator.checkIsBeneficiary()) || Boolean.TRUE.equals(validator.checkIsConfidi())) {
|
||||
predicate = builder.and(predicate, builder.equal(root.get("userId"), userEntity.getId()));
|
||||
}
|
||||
if (callId != null) {
|
||||
@@ -742,7 +742,7 @@ public class ApplicationDao {
|
||||
List<FormApplicationResponse> formApplicationResponses = new ArrayList<>();
|
||||
List<FormEntity> formEntities = new ArrayList<>();
|
||||
UserEntity userEntity = validator.validateUser(request);
|
||||
boolean isBeneficiary = isBeneficiary(userEntity);
|
||||
boolean isBeneficiary = Boolean.TRUE.equals(validator.checkIsBeneficiary()) || Boolean.TRUE.equals(validator.checkIsConfidi());
|
||||
ApplicationEntity applicationEntity = isBeneficiary
|
||||
? applicationRepository.findByIdAndUserIdAndIsDeletedFalse(applicationId, userEntity.getId())
|
||||
.orElseThrow(() -> new CustomValidationException(Status.BAD_REQUEST, Translator.toLocale(GepafinConstant.APPLICATION_NOT_FOUND_MSG)))
|
||||
@@ -1530,8 +1530,8 @@ public class ApplicationDao {
|
||||
}
|
||||
List<Predicate> predicates = new ArrayList<>();
|
||||
|
||||
Boolean isBeneficiary = validator.checkIsBeneficiary();
|
||||
if (isBeneficiary) {
|
||||
// Boolean isBeneficiary = validator.checkIsBeneficiary();
|
||||
if (Boolean.TRUE.equals(validator.checkIsBeneficiary()) || Boolean.TRUE.equals(validator.checkIsConfidi())) {
|
||||
predicates.add(criteriaBuilder.equal(root.get(GepafinConstant.USER_ID), userEntity.getId()));
|
||||
}
|
||||
if (year != null && year > 0) {
|
||||
|
||||
Reference in New Issue
Block a user