From 487c60d7c3777dcf49f2c655a621e8acd6957fb6 Mon Sep 17 00:00:00 2001 From: Fabian Emilius Date: Mon, 29 Jul 2024 18:40:50 +0200 Subject: [PATCH] Allow to select supervisor as advisor as well --- .../LegacyApplicationReviewModal.tsx | 2 +- .../main/java/thesistrack/ls1/service/ApplicationService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/pages/LegacyApplicationReviewPage/components/LegacyApplicationReviewModal/LegacyApplicationReviewModal.tsx b/client/src/pages/LegacyApplicationReviewPage/components/LegacyApplicationReviewModal/LegacyApplicationReviewModal.tsx index fe73dc73..9e3ccdb5 100644 --- a/client/src/pages/LegacyApplicationReviewPage/components/LegacyApplicationReviewModal/LegacyApplicationReviewModal.tsx +++ b/client/src/pages/LegacyApplicationReviewPage/components/LegacyApplicationReviewModal/LegacyApplicationReviewModal.tsx @@ -170,7 +170,7 @@ const LegacyApplicationReviewModal = (props: ILegacyApplicationReviewModalProps) /> diff --git a/server/src/main/java/thesistrack/ls1/service/ApplicationService.java b/server/src/main/java/thesistrack/ls1/service/ApplicationService.java index 8871fb6f..9047b619 100644 --- a/server/src/main/java/thesistrack/ls1/service/ApplicationService.java +++ b/server/src/main/java/thesistrack/ls1/service/ApplicationService.java @@ -159,7 +159,7 @@ public Application accept( thesis = thesisRepository.save(thesis); for (User advisor : advisors) { - if (!advisor.hasGroup("advisor")) { + if (!advisor.hasGroup("advisor") && !advisor.hasGroup("supervisor")) { throw new ResourceInvalidParametersException("User is not an advisor."); }