diff --git a/.github/workflows/deploy_docker.yml b/.github/workflows/deploy_docker.yml
index 4c130630..f82c0bca 100644
--- a/.github/workflows/deploy_docker.yml
+++ b/.github/workflows/deploy_docker.yml
@@ -113,6 +113,7 @@ jobs:
echo "STUDY_PROGRAMS=${{ vars.STUDY_PROGRAMS }}" >> .env.prod
echo "STUDY_DEGREES=${{ vars.STUDY_DEGREES }}" >> .env.prod
echo "GENDERS=${{ vars.GENDERS }}" >> .env.prod
+ echo "LANGUAGES=${{ vars.LANGUAGES }}" >> .env.prod
echo "CUSTOM_DATA=${{ vars.CUSTOM_DATA }}" >> .env.prod
echo "MAIL_SENDER=${{ vars.MAIL_SENDER }}" >> .env.prod
diff --git a/client/public/generate-runtime-env.js b/client/public/generate-runtime-env.js
index d32cf495..d54d110d 100644
--- a/client/public/generate-runtime-env.js
+++ b/client/public/generate-runtime-env.js
@@ -16,6 +16,7 @@ const ALLOWED_ENVIRONMENT_VARIABLES = [
'GENDERS',
'STUDY_DEGREES',
'STUDY_PROGRAMS',
+ 'LANGUAGES',
'CUSTOM_DATA',
'CALDAV_URL',
]
diff --git a/client/src/components/PresentationsTable/PresentationsTable.tsx b/client/src/components/PresentationsTable/PresentationsTable.tsx
index 07e89946..ccba58e3 100644
--- a/client/src/components/PresentationsTable/PresentationsTable.tsx
+++ b/client/src/components/PresentationsTable/PresentationsTable.tsx
@@ -2,6 +2,7 @@ import React from 'react'
import { DataTable, DataTableColumn } from 'mantine-datatable'
import { IPublishedPresentation, IThesisPresentation } from '../../requests/responses/thesis'
import { formatDate, formatPresentationType } from '../../utils/format'
+import { GLOBAL_CONFIG } from '../../config/global'
interface IPresentationsTableProps {
presentations: T[] | undefined
@@ -46,6 +47,13 @@ const PresentationsTable =
),
},
+ {
+ accessor: 'language',
+ title: 'Language',
+ width: 120,
+ ellipsis: true,
+ render: (presentation) => GLOBAL_CONFIG.languages[presentation.language] ?? presentation.language,
+ },
{
accessor: 'scheduledAt',
title: 'Scheduled At',
diff --git a/client/src/config/global.ts b/client/src/config/global.ts
index d391fa40..d7f4d72a 100644
--- a/client/src/config/global.ts
+++ b/client/src/config/global.ts
@@ -49,6 +49,11 @@ export const GLOBAL_CONFIG: IGlobalConfig = {
GUIDED_RESEARCH: 'Guided Research',
},
+ languages: getEnvironmentVariable>('LANGUAGES', true) || {
+ ENGLISH: 'English',
+ GERMAN: 'German',
+ },
+
custom_data: getEnvironmentVariable>('CUSTOM_DATA', true) || {
GITHUB: 'Github Profile',
},
diff --git a/client/src/config/types.ts b/client/src/config/types.ts
index ce5b5e95..997b58ed 100644
--- a/client/src/config/types.ts
+++ b/client/src/config/types.ts
@@ -13,6 +13,7 @@ export interface IGlobalConfig {
study_degrees: Record
thesis_types: Record
custom_data: Record
+ languages: Record
privacy_text: string
imprint_text: string
diff --git a/client/src/pages/ThesisPage/components/ThesisWritingSection/components/CreatePresentationModal/CreatePresentationModal.tsx b/client/src/pages/ThesisPage/components/ThesisWritingSection/components/CreatePresentationModal/CreatePresentationModal.tsx
index fe59a0b1..4c6aca00 100644
--- a/client/src/pages/ThesisPage/components/ThesisWritingSection/components/CreatePresentationModal/CreatePresentationModal.tsx
+++ b/client/src/pages/ThesisPage/components/ThesisWritingSection/components/CreatePresentationModal/CreatePresentationModal.tsx
@@ -26,6 +26,7 @@ const CreatePresentationModal = (props: ICreatePresentationModalProps) => {
visibility: string
location: string
streamUrl: string
+ language: string | null
date: DateValue
}>({
mode: 'controlled',
@@ -34,6 +35,7 @@ const CreatePresentationModal = (props: ICreatePresentationModalProps) => {
visibility: 'PUBLIC',
location: '',
streamUrl: '',
+ language: null,
date: null,
},
validateInputOnBlur: true,
@@ -50,6 +52,7 @@ const CreatePresentationModal = (props: ICreatePresentationModalProps) => {
return 'Location or Stream URL is required'
}
},
+ language: isNotEmpty('Language is required'),
date: (value) => {
if (!value) {
return 'Date is required'
@@ -80,6 +83,7 @@ const CreatePresentationModal = (props: ICreatePresentationModalProps) => {
visibility: form.values.visibility,
location: form.values.location,
streamUrl: form.values.streamUrl,
+ language: form.values.language,
date: form.values.date,
},
})
diff --git a/client/src/requests/responses/thesis.ts b/client/src/requests/responses/thesis.ts
index 5a1508e9..f61723a9 100644
--- a/client/src/requests/responses/thesis.ts
+++ b/client/src/requests/responses/thesis.ts
@@ -15,6 +15,7 @@ export interface IThesisPresentation {
type: string
location: string | null
streamUrl: string | null
+ language: string
scheduledAt: string
createdAt: string
createdBy: ILightUser
@@ -92,6 +93,7 @@ export interface IPublishedPresentation {
type: string
location: string | null
streamUrl: string | null
+ language: string
scheduledAt: string
thesis: IPublishedThesis
}
diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml
index c31badf9..88ac3aa0 100644
--- a/docker-compose.prod.yml
+++ b/docker-compose.prod.yml
@@ -104,6 +104,7 @@ services:
- STUDY_PROGRAMS
- STUDY_DEGREES
- GENDERS
+ - LANGUAGES
- CUSTOM_DATA
- APPLICATION_TITLE
- CHAIR_NAME
diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md
index db6f8080..476b1437 100644
--- a/docs/CONFIGURATION.md
+++ b/docs/CONFIGURATION.md
@@ -36,6 +36,7 @@
| STUDY_PROGRAMS | client | `{"COMPUTER_SCIENCE":"Computer Science","INFORMATION_SYSTEMS":"Information Systems","GAMES_ENGINEERING":"Games Engineering","MANAGEMENT_AND_TECHNOLOGY":"Management and Technology","OTHER":"Other"}` | Available study programs |
| CUSTOM_DATA | client | `{"GITHUB":"Github Profile"}` | Additional data the user can add to the profile |
| THESIS_TYPES | client | `{"BACHELOR":"Bachelor Thesis","MASTER":"Master Thesis","INTERDISCIPLINARY_PROJECT":"Interdisciplinary Project","GUIDED_RESEARCH":"Guided Research"}` | Available thesis types |
+| LANGUAGES | client | `{"ENGLISH":"English","GERMAN":"German"}` | Available languages for presentations |
| DEFAULT_SUPERVISOR_UUID | client | | The user UUID from the database if a default supervisor should be selected when creating topics or theses |
| PRIVACY | client | | Privacy content (Allows richtext format) |
| IMPRINT | client | | Imprint content (Allows richtext format) |
diff --git a/server/mail-templates/application-created-student.html b/server/mail-templates/application-created-student.html
index c2909cb9..006c67c4 100644
--- a/server/mail-templates/application-created-student.html
+++ b/server/mail-templates/application-created-student.html
@@ -54,9 +54,11 @@
-You can find the submitted files in the attachment part of this email.
-
-We are currently experiencing a high volume of thesis applications, and each one requires careful review.
+
+ We are currently experiencing a high volume of thesis applications, and each one requires careful review.
While we aim to respond as quickly as possible, the combination of the application volume and the intensive teaching
and research commitments of our group may result in a response time of up to four weeks.
- We appreciate your patience and understanding during this period.
+ We appreciate your patience and understanding during this period.
+
+
+You can find the submitted files in the attachment part of this email.
diff --git a/server/mail-templates/thesis-presentation-invitation.html b/server/mail-templates/thesis-presentation-invitation.html
new file mode 100644
index 00000000..c9023293
--- /dev/null
+++ b/server/mail-templates/thesis-presentation-invitation.html
@@ -0,0 +1,34 @@
+Dear {{recipientName}},
+
+
+ As part of their {{thesis.type}}'s thesis {{thesis.students}} will give their {{presentation.type}} presentation.
+
+
+
+ The presentation will be in {{presentation.language}}. Everybody is cordially invited to attend.
+
+
+
+ Title
+ {{thesis.title}}
+
+
+
+ Offline Location
+ {{presentation.location}}
+
+
+
+ Online Stream URL
+ {{presentation.streamUrl}}
+
+
+
+ Scheduled At
+ {{presentation.scheduledAt}}
+
+
+
+ Abstract
+ {{thesis.abstractText}}
+
diff --git a/server/src/main/java/thesistrack/ls1/controller/ThesisController.java b/server/src/main/java/thesistrack/ls1/controller/ThesisController.java
index 8befd46d..3e7987e7 100644
--- a/server/src/main/java/thesistrack/ls1/controller/ThesisController.java
+++ b/server/src/main/java/thesistrack/ls1/controller/ThesisController.java
@@ -372,6 +372,7 @@ public ResponseEntity createPresentation(
RequestValidator.validateNotNull(payload.visibility()),
RequestValidator.validateStringMaxLength(payload.location(), StringLimits.SHORTTEXT.getLimit()),
RequestValidator.validateStringMaxLength(payload.streamUrl(), StringLimits.SHORTTEXT.getLimit()),
+ RequestValidator.validateStringMaxLength(payload.language(), StringLimits.SHORTTEXT.getLimit()),
RequestValidator.validateNotNull(payload.date())
);
diff --git a/server/src/main/java/thesistrack/ls1/controller/payload/CreatePresentationPayload.java b/server/src/main/java/thesistrack/ls1/controller/payload/CreatePresentationPayload.java
index 9432301d..86bc6774 100644
--- a/server/src/main/java/thesistrack/ls1/controller/payload/CreatePresentationPayload.java
+++ b/server/src/main/java/thesistrack/ls1/controller/payload/CreatePresentationPayload.java
@@ -10,5 +10,6 @@ public record CreatePresentationPayload(
ThesisPresentationVisibility visibility,
String location,
String streamUrl,
+ String language,
Instant date
) { }
diff --git a/server/src/main/java/thesistrack/ls1/dto/PublishedPresentationDto.java b/server/src/main/java/thesistrack/ls1/dto/PublishedPresentationDto.java
index 88b5517e..307f790f 100644
--- a/server/src/main/java/thesistrack/ls1/dto/PublishedPresentationDto.java
+++ b/server/src/main/java/thesistrack/ls1/dto/PublishedPresentationDto.java
@@ -11,6 +11,7 @@ public record PublishedPresentationDto (
ThesisPresentationType type,
String location,
String streamUrl,
+ String language,
Instant scheduledAt,
PublishedThesisDto thesis
) {
@@ -24,6 +25,7 @@ public static PublishedPresentationDto fromPresentationEntity(ThesisPresentation
presentation.getType(),
presentation.getLocation(),
presentation.getStreamUrl(),
+ presentation.getLanguage(),
presentation.getScheduledAt(),
PublishedThesisDto.fromThesisEntity(presentation.getThesis())
);
diff --git a/server/src/main/java/thesistrack/ls1/dto/ThesisDto.java b/server/src/main/java/thesistrack/ls1/dto/ThesisDto.java
index fb32cfd9..8eb35362 100644
--- a/server/src/main/java/thesistrack/ls1/dto/ThesisDto.java
+++ b/server/src/main/java/thesistrack/ls1/dto/ThesisDto.java
@@ -85,6 +85,7 @@ public record ThesisPresentationDto(
ThesisPresentationType type,
String location,
String streamUrl,
+ String language,
Instant scheduledAt,
Instant createdAt,
LightUserDto createdBy
@@ -99,6 +100,7 @@ public static ThesisPresentationDto fromPresentationEntity(ThesisPresentation pr
presentation.getType(),
presentation.getLocation(),
presentation.getStreamUrl(),
+ presentation.getLanguage(),
presentation.getScheduledAt(),
presentation.getCreatedAt(),
LightUserDto.fromUserEntity(presentation.getCreatedBy())
diff --git a/server/src/main/java/thesistrack/ls1/entity/ThesisPresentation.java b/server/src/main/java/thesistrack/ls1/entity/ThesisPresentation.java
index daed3cb9..f19194ce 100644
--- a/server/src/main/java/thesistrack/ls1/entity/ThesisPresentation.java
+++ b/server/src/main/java/thesistrack/ls1/entity/ThesisPresentation.java
@@ -42,6 +42,9 @@ public class ThesisPresentation {
@Column(name = "stream_url")
private String streamUrl;
+ @Column(name = "language")
+ private String language;
+
@Column(name = "calendar_event")
private String calendarEvent;
diff --git a/server/src/main/java/thesistrack/ls1/repository/UserRepository.java b/server/src/main/java/thesistrack/ls1/repository/UserRepository.java
index dec4f98c..50b07988 100644
--- a/server/src/main/java/thesistrack/ls1/repository/UserRepository.java
+++ b/server/src/main/java/thesistrack/ls1/repository/UserRepository.java
@@ -27,6 +27,6 @@ public interface UserRepository extends JpaRepository {
)
Page searchUsers(@Param("searchQuery") String searchQuery, @Param("groups") Set groups, Pageable page);
- @Query("SELECT DISTINCT u FROM User u LEFT JOIN UserGroup g ON (u.id = g.id.userId) WHERE g.id.group IN (\"supervisor\", \"advisor\", \"admin\")")
- List getChairMembers();
+ @Query("SELECT DISTINCT u FROM User u LEFT JOIN UserGroup g ON (u.id = g.id.userId) WHERE g.id.group IN :roles")
+ List getRoleMembers(@Param("roles") Set roles);
}
diff --git a/server/src/main/java/thesistrack/ls1/service/MailingService.java b/server/src/main/java/thesistrack/ls1/service/MailingService.java
index b99d1557..fe2e900f 100644
--- a/server/src/main/java/thesistrack/ls1/service/MailingService.java
+++ b/server/src/main/java/thesistrack/ls1/service/MailingService.java
@@ -1,5 +1,6 @@
package thesistrack.ls1.service;
+import jakarta.mail.util.ByteArrayDataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.stereotype.Service;
@@ -9,21 +10,25 @@
import thesistrack.ls1.utility.MailBuilder;
import thesistrack.ls1.utility.MailConfig;
+import java.nio.charset.StandardCharsets;
+
@Service
public class MailingService {
private final JavaMailSender javaMailSender;
private final UploadService uploadService;
private final MailConfig config;
+ private final ThesisPresentationService thesisPresentationService;
@Autowired
public MailingService(
JavaMailSender javaMailSender,
UploadService uploadService,
- MailConfig config
- ) {
+ MailConfig config,
+ ThesisPresentationService thesisPresentationService) {
this.javaMailSender = javaMailSender;
this.uploadService = uploadService;
this.config = config;
+ this.thesisPresentationService = thesisPresentationService;
}
public void sendApplicationCreatedEmail(Application application) {
@@ -156,6 +161,28 @@ public void sendPresentationDeletedEmail(User deletingUser, ThesisPresentation p
.send(javaMailSender, uploadService);
}
+ public void sendPresentationInvitation(ThesisPresentation presentation) {
+ MailBuilder builder = new MailBuilder(config, "Thesis Presentation Invitation", "thesis-presentation-invitation");
+ builder
+ .sendToChairMembers()
+ .sendToChairStudents()
+ .fillThesisPresentationPlaceholders(presentation);
+
+ for (ThesisRole role : presentation.getThesis().getRoles()) {
+ builder.addPrimarySender(role.getUser());
+ }
+
+ builder.addRawAttatchment(
+ "event.ics",
+ new ByteArrayDataSource(
+ thesisPresentationService.getPresentationEvent(presentation).toString().getBytes(StandardCharsets.UTF_8),
+ "application/octet-stream"
+ )
+ );
+
+ builder.send(javaMailSender, uploadService);
+ }
+
public void sendFinalSubmissionEmail(Thesis thesis) {
MailBuilder builder = new MailBuilder(config, "Thesis Submitted", "thesis-final-submission");
builder
diff --git a/server/src/main/java/thesistrack/ls1/service/ThesisPresentationService.java b/server/src/main/java/thesistrack/ls1/service/ThesisPresentationService.java
index 4ea357a2..b6de17b5 100644
--- a/server/src/main/java/thesistrack/ls1/service/ThesisPresentationService.java
+++ b/server/src/main/java/thesistrack/ls1/service/ThesisPresentationService.java
@@ -36,10 +36,8 @@ public ThesisPresentationService(CalendarService calendarService, ThesisReposito
}
public Calendar getPresentationCalendar() {
- Calendar calendar = new Calendar();
+ Calendar calendar = createEmptyCalendar();
- calendar.add(new ProdId("-//Thesis Track//Thesis Presentations//EN"));
- calendar.add(ImmutableCalScale.GREGORIAN);
calendar.add(ImmutableMethod.PUBLISH);
List presentations = thesisPresentationRepository.findAllPresentations(
@@ -53,6 +51,14 @@ public Calendar getPresentationCalendar() {
return calendar;
}
+ public Calendar getPresentationEvent(ThesisPresentation presentation) {
+ Calendar calendar = createEmptyCalendar();
+
+ calendar.add(calendarService.createVEvent(presentation.getId().toString(), createPresentationCalendarEvent(presentation)));
+
+ return calendar;
+ }
+
@Transactional
public Thesis createPresentation(
User creatingUser,
@@ -61,6 +67,7 @@ public Thesis createPresentation(
ThesisPresentationVisibility visibility,
String location,
String streamUrl,
+ String language,
Instant date
) {
ThesisPresentation presentation = new ThesisPresentation();
@@ -70,6 +77,7 @@ public Thesis createPresentation(
presentation.setVisibility(visibility);
presentation.setLocation(location);
presentation.setStreamUrl(streamUrl);
+ presentation.setLanguage(language);
presentation.setScheduledAt(date);
presentation.setCreatedBy(creatingUser);
presentation.setCreatedAt(Instant.now());
@@ -79,6 +87,8 @@ public Thesis createPresentation(
if (visibility.equals(ThesisPresentationVisibility.PUBLIC)) {
presentation.setCalendarEvent(calendarService.createEvent(createPresentationCalendarEvent(presentation)));
presentation = thesisPresentationRepository.save(presentation);
+
+ mailingService.sendPresentationInvitation(presentation);
}
List presentations = thesis.getPresentations();
@@ -134,6 +144,15 @@ public ThesisPresentation findById(UUID thesisId, UUID presentationId) {
return presentation;
}
+ private Calendar createEmptyCalendar() {
+ Calendar calendar = new Calendar();
+
+ calendar.add(new ProdId("-//Thesis Track//Thesis Presentations//EN"));
+ calendar.add(ImmutableCalScale.GREGORIAN);
+
+ return calendar;
+ }
+
private CalendarService.CalendarEvent createPresentationCalendarEvent(ThesisPresentation presentation) {
String location = presentation.getLocation();
String streamUrl = presentation.getStreamUrl();
@@ -143,6 +162,7 @@ private CalendarService.CalendarEvent createPresentationCalendarEvent(ThesisPres
location == null || location.isBlank() ? streamUrl : location,
"Title: " + presentation.getThesis().getTitle() + "\n" +
(streamUrl != null && !streamUrl.isBlank() ? "Stream URL: " + streamUrl + "\n" : "") + "\n" +
+ "Language: " + presentation.getLanguage() + "\n" +
"Abstract:\n\n" + presentation.getThesis().getAbstractField(),
presentation.getScheduledAt(),
presentation.getScheduledAt().plus(60, ChronoUnit.MINUTES),
diff --git a/server/src/main/java/thesistrack/ls1/utility/MailBuilder.java b/server/src/main/java/thesistrack/ls1/utility/MailBuilder.java
index dad754a0..a1c5c893 100644
--- a/server/src/main/java/thesistrack/ls1/utility/MailBuilder.java
+++ b/server/src/main/java/thesistrack/ls1/utility/MailBuilder.java
@@ -1,10 +1,12 @@
package thesistrack.ls1.utility;
+import jakarta.activation.DataHandler;
import jakarta.mail.*;
import jakarta.mail.internet.InternetAddress;
import jakarta.mail.internet.MimeBodyPart;
import jakarta.mail.internet.MimeMessage;
import jakarta.mail.internet.MimeMultipart;
+import jakarta.mail.util.ByteArrayDataSource;
import lombok.Getter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -18,6 +20,7 @@
import thesistrack.ls1.exception.MailingException;
import thesistrack.ls1.service.UploadService;
+import java.io.File;
import java.io.IOException;
import java.lang.reflect.Field;
import java.time.Instant;
@@ -41,7 +44,12 @@ public class MailBuilder {
private String content;
@Getter
- private final List attachments;
+ private final List fileAttachments;
+
+ @Getter
+ private final List rawAttachments;
+
+ private record RawAttachment(String name, ByteArrayDataSource file) {}
public MailBuilder(MailConfig config, String subject, String template) {
this.config = config;
@@ -53,7 +61,8 @@ public MailBuilder(MailConfig config, String subject, String template) {
this.subject = subject;
this.content = config.getTemplate(template);
- this.attachments = new ArrayList<>();
+ this.fileAttachments = new ArrayList<>();
+ this.rawAttachments = new ArrayList<>();
}
public MailBuilder addAttachmentFile(String filename) {
@@ -61,7 +70,17 @@ public MailBuilder addAttachmentFile(String filename) {
return this;
}
- attachments.add(filename);
+ fileAttachments.add(filename);
+
+ return this;
+ }
+
+ public MailBuilder addRawAttatchment(String filename, ByteArrayDataSource file) {
+ if (filename == null || filename.isBlank()) {
+ return this;
+ }
+
+ rawAttachments.add(new RawAttachment(filename, file));
return this;
}
@@ -106,6 +125,14 @@ public MailBuilder sendToChairMembers() {
return this;
}
+ public MailBuilder sendToChairStudents() {
+ for (User user : config.getChairStudents()) {
+ addPrimaryRecipient(user);
+ }
+
+ return this;
+ }
+
public MailBuilder sendToThesisSupervisors(Thesis thesis) {
for (ThesisRole role : thesis.getRoles()) {
if (role.getId().getRole() == ThesisRoleName.SUPERVISOR) {
@@ -203,7 +230,13 @@ public MailBuilder fillThesisCommentPlaceholders(ThesisComment comment) {
public MailBuilder fillThesisPresentationPlaceholders(ThesisPresentation presentation) {
fillThesisPlaceholders(presentation.getThesis());
- replaceDtoPlaceholders(ThesisDto.ThesisPresentationDto.fromPresentationEntity(presentation), "presentation", new HashMap<>());
+
+ HashMap> formatters = new HashMap<>();
+
+ formatters.put("presentation.type", DataFormatter::formatConstantName);
+ formatters.put("presentation.language", DataFormatter::formatConstantName);
+
+ replaceDtoPlaceholders(ThesisDto.ThesisPresentationDto.fromPresentationEntity(presentation), "presentation", formatters);
return this;
}
@@ -256,12 +289,21 @@ public void send(JavaMailSender mailSender, UploadService uploadService) throws
);
messageContent.addBodyPart(messageBody);
- for (String filename : attachments) {
+ for (String filename : fileAttachments) {
MimeBodyPart attachment = new MimeBodyPart();
attachment.attachFile(uploadService.load(filename).getFile());
messageContent.addBodyPart(attachment);
}
+ for (RawAttachment data : rawAttachments) {
+ MimeBodyPart attachment = new MimeBodyPart();
+
+ attachment.setDataHandler(new DataHandler(data.file()));
+ attachment.setFileName(data.name());
+
+ messageContent.addBodyPart(attachment);
+ }
+
message.setContent(messageContent);
mailSender.send(message);
diff --git a/server/src/main/java/thesistrack/ls1/utility/MailConfig.java b/server/src/main/java/thesistrack/ls1/utility/MailConfig.java
index 6b5d35c5..eb979436 100644
--- a/server/src/main/java/thesistrack/ls1/utility/MailConfig.java
+++ b/server/src/main/java/thesistrack/ls1/utility/MailConfig.java
@@ -15,10 +15,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Objects;
+import java.util.*;
@Component
public class MailConfig {
@@ -83,7 +80,11 @@ public boolean isEnabled() {
}
public List getChairMembers() {
- return userRepository.getChairMembers();
+ return userRepository.getRoleMembers(Set.of("admin", "supervisor", "advisor"));
+ }
+
+ public List getChairStudents() {
+ return userRepository.getRoleMembers(Set.of("student"));
}
public String getTemplate(String name) {
diff --git a/server/src/main/resources/db/changelog/changes/07_cleanup.sql b/server/src/main/resources/db/changelog/changes/07_cleanup.sql
index b69a4a4d..d5fe8378 100644
--- a/server/src/main/resources/db/changelog/changes/07_cleanup.sql
+++ b/server/src/main/resources/db/changelog/changes/07_cleanup.sql
@@ -16,3 +16,6 @@ ALTER TABLE topics ADD COLUMN requirements TEXT NOT NULL DEFAULT '';
--changeset emilius:07-cleanup-5
ALTER TABLE applications ADD COLUMN reject_reason TEXT;
+
+--changeset emilius:07-cleanup-6
+ALTER TABLE thesis_presentations ADD COLUMN language TEXT NOT NULL DEFAULT 'ENGLISH';