diff --git a/resq/backend/resq/src/main/java/com/groupa1/resq/controller/NeedController.java b/resq/backend/resq/src/main/java/com/groupa1/resq/controller/NeedController.java index 7414ca43..3af680da 100644 --- a/resq/backend/resq/src/main/java/com/groupa1/resq/controller/NeedController.java +++ b/resq/backend/resq/src/main/java/com/groupa1/resq/controller/NeedController.java @@ -27,7 +27,7 @@ public class NeedController { private NeedService needService; @GetMapping("/viewNeedsByFilter") - @PreAuthorize("hasRole('FACILITATOR') or hasRole('COORDINATOR')") + @PreAuthorize("hasRole('VICTIM') or hasRole('FACILITATOR') or hasRole('COORDINATOR')") public ResponseEntity> viewNeedsByFilter(@RequestParam(required = false) BigDecimal longitude1, @RequestParam(required = false) BigDecimal latitude1, @RequestParam(required = false) BigDecimal longitude2, @@ -47,7 +47,7 @@ public Long createNeed(@RequestParam Long userId, @RequestBody CreateNeedRequest } @GetMapping("/viewAllNeeds") - @PreAuthorize("hasRole('FACILITATOR')") + @PreAuthorize("hasRole('VICTIM') or hasRole('FACILITATOR')") public ResponseEntity> viewAllNeeds() { log.info("Viewing all needs"); return needService.viewAllNeeds(); @@ -91,7 +91,7 @@ public ResponseEntity cancelNeed(@RequestParam Long needId) { } @GetMapping("/filterByDistance") - @PreAuthorize("hasRole('FACILITATOR') or hasRole('COORDINATOR')") + @PreAuthorize("hasRole('VICTIM') or hasRole('FACILITATOR') or hasRole('COORDINATOR')") public ResponseEntity> filterByDistance(@RequestParam BigDecimal longitude, @RequestParam BigDecimal latitude, @RequestParam BigDecimal distance) {