diff --git a/src/main/java/com/example/questionbank/web/rest/ExamAttemptResource.java b/src/main/java/com/example/questionbank/web/rest/ExamAttemptResource.java index 56ec94c..5a6e673 100644 --- a/src/main/java/com/example/questionbank/web/rest/ExamAttemptResource.java +++ b/src/main/java/com/example/questionbank/web/rest/ExamAttemptResource.java @@ -161,6 +161,7 @@ public class ExamAttemptResource { * @param eagerload flag to eager load entities from relationships (This is applicable for many-to-many). * @return the {@link ResponseEntity} with status {@code 200 (OK)} and the list of Exam Attempts in body. */ + @PreAuthorize("hasAuthority('" + AuthoritiesConstants.ADMIN + "')") @GetMapping("") public ResponseEntity> getAllExamAttempts( @org.springdoc.core.annotations.ParameterObject Pageable pageable,