Fix: opened an endpoint on announcements.
This commit is contained in:
@@ -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()
|
||||
);
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user