SEBSERV-417 fix teacher account selection for supporter
This commit is contained in:
parent
ce168094cf
commit
45969934c3
1 changed files with 2 additions and 1 deletions
|
@ -15,6 +15,7 @@ import java.util.stream.Collectors;
|
|||
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;
|
||||
|
@ -682,7 +683,7 @@ public class ExamAdministrationController extends EntityController<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();
|
||||
|
|
Loading…
Reference in a new issue