Skip to content

Commit

Permalink
SEBSERV-417 fix teacher account selection for supporter
Browse files Browse the repository at this point in the history
  • Loading branch information
anhefti committed Jun 20, 2024
1 parent ce16809 commit 4596993
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import javax.validation.Valid;

import ch.ethz.seb.sebserver.gbl.model.Activatable;
import ch.ethz.seb.sebserver.gbl.model.user.UserInfo;
import ch.ethz.seb.sebserver.gbl.util.Cryptor;
import ch.ethz.seb.sebserver.webservice.servicelayer.exam.ExamImportService;
import ch.ethz.seb.sebserver.webservice.servicelayer.exam.ExamUtils;
Expand Down Expand Up @@ -682,7 +683,7 @@ private Exam checkExamSupporterRole(final Exam exam) {
this.authorization.getUserService().getCurrentUser().getUserInfo().institutionId,
true)
.map(users -> users.stream()
.filter(user -> user.getRoles().contains(UserRole.EXAM_SUPPORTER.name()))
.filter(user -> user.hasAnyRole(UserRole.EXAM_SUPPORTER, UserRole.TEACHER))
.map(user -> user.uuid)
.collect(Collectors.toSet()))
.getOrThrow();
Expand Down

0 comments on commit 4596993

Please sign in to comment.