Skip to content

Commit

Permalink
impl. suggested change
Browse files Browse the repository at this point in the history
  • Loading branch information
max-bergmann committed Oct 30, 2023
1 parent 5d2dde1 commit d166acf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public ResponseEntity<Set<String>> getUniqueLanguageValues(@PathVariable Long co
public ResponseEntity<List<TutorialGroup>> getAllForCourse(@PathVariable Long courseId) {
log.debug("REST request to get all tutorial groups of course with id: {}", courseId);
var course = courseRepository.findByIdElseThrow(courseId);
var user = userRepository.getUser();
var user = userRepository.getUserWithGroupsAndAuthorities();
authorizationCheckService.checkHasAtLeastRoleInCourseElseThrow(Role.STUDENT, course, user);
// ToDo: Optimization Idea: Do not send all registered student information but just the number in a DTO
var tutorialGroups = tutorialGroupService.findAllForCourse(course, user);
Expand Down

0 comments on commit d166acf

Please sign in to comment.