Skip to content
Snippets Groups Projects
Commit 65aac575 authored by Henry Page's avatar Henry Page :speech_balloon:
Browse files

remove deprecated api usage

parent dc4c1cb6
No related branches found
No related tags found
2 merge requests!711Version 2.2.1,!659Resolve "Teachers should only be able to see feedback from students in their courses"
...@@ -38,6 +38,7 @@ import nl.tudelft.queue.repository.FeedbackRepository; ...@@ -38,6 +38,7 @@ import nl.tudelft.queue.repository.FeedbackRepository;
import nl.tudelft.queue.repository.LabRequestRepository; import nl.tudelft.queue.repository.LabRequestRepository;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
...@@ -58,6 +59,10 @@ public class FeedbackService { ...@@ -58,6 +59,10 @@ public class FeedbackService {
@Autowired @Autowired
private PermissionService ps; private PermissionService ps;
@Autowired
@Lazy
private LabService ls;
@Autowired @Autowired
private SessionCacheManager sessionCacheManager; private SessionCacheManager sessionCacheManager;
...@@ -150,7 +155,8 @@ public class FeedbackService { ...@@ -150,7 +155,8 @@ public class FeedbackService {
.distinct() .distinct()
.toList(); .toList();
Map<Long, Boolean> canManage = sessionCacheManager.get(sessionIds).stream() Map<Long, Boolean> canManage = sessionCacheManager
.getAndHandleAll(sessionIds, ls.deleteSessionsByIds()).stream()
.collect(Collectors.toMap( .collect(Collectors.toMap(
SessionDetailsDTO::getId, SessionDetailsDTO::getId,
session -> ps.canManageInAnyEdition(session.getEditions()))); session -> ps.canManageInAnyEdition(session.getEditions())));
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment