From df97391fb69b4dc7a7c3c29df137b18c52a52b89 Mon Sep 17 00:00:00 2001 From: pierrehenri-dauvergne Date: Tue, 17 Dec 2024 14:21:03 +0100 Subject: [PATCH] shanoir-issue#2540: no subject in a study means we have all rights on subject of that study --- .../org/shanoir/ng/study/security/StudySecurityService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shanoir-ng-studies/src/main/java/org/shanoir/ng/study/security/StudySecurityService.java b/shanoir-ng-studies/src/main/java/org/shanoir/ng/study/security/StudySecurityService.java index 0b5aec5c1c..e8a1b4290d 100644 --- a/shanoir-ng-studies/src/main/java/org/shanoir/ng/study/security/StudySecurityService.java +++ b/shanoir-ng-studies/src/main/java/org/shanoir/ng/study/security/StudySecurityService.java @@ -245,7 +245,7 @@ public boolean hasRightOnSubjectsForOneStudy(List subjectDTOs, } List subjects = Utils.toList(subjectRepository.findAllById(subjectIds)); if (subjects == null || subjects.isEmpty()) { - throw new EntityNotFoundException("Cannot find any subject with id in " + subjectIds); + return true; } for (Subject subject : subjects) { if (subject.getSubjectStudyList() == null) {