Fix: opened an endpoint on announcements.

This commit is contained in:
Jose
2026-01-22 13:45:39 +01:00
parent 2523b22043
commit b214b77791
2 changed files with 6 additions and 7 deletions

View File

@@ -43,10 +43,10 @@ public class SecurityConfig {
.authorizeHttpRequests(auth -> auth
// PUBLICAS
.requestMatchers("/login").permitAll()
.requestMatchers("/announces").permitAll()
.requestMatchers("/requests").permitAll()
.requestMatchers("/huertos/users/waitlist/limited").permitAll()
.requestMatchers("/huertos/users/latest-number").permitAll()
.requestMatchers("/announcements").permitAll()
.requestMatchers("/requests/mine").permitAll()
.requestMatchers("/users/waitlist/limited").permitAll()
.requestMatchers("/users/latest-number").permitAll()
// PRIVADAS
.anyRequest().authenticated()
);

View File

@@ -23,7 +23,6 @@ public class AnnouncementController {
}
@GetMapping
@PreAuthorize("hasAnyRole('HUERTOS_ROLE_ADMIN', 'HUERTOS_ROLE_DEV')")
public ResponseEntity<List<AnnouncementDto.Response>> getAll() {
return ResponseEntity.ok(
announcementService.getAll()