Skip to content

Commit

Permalink
Modify access control for fetching all notification templates (#1387)
Browse files Browse the repository at this point in the history
  • Loading branch information
KizerovDmitriy authored Jun 27, 2024
1 parent 473e536 commit c0e984d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

Expand All @@ -38,6 +39,7 @@ public class ManagementNotificationController {
})
@GetMapping("/get-all-templates")
@ApiPageable
@PreAuthorize("@preAuthorizer.hasAuthority('SEE_MESSAGES_PAGE', authentication)")
public ResponseEntity<PageableDto<NotificationTemplateDto>> getAll(@ApiIgnore Pageable pageable) {
return ResponseEntity.status(HttpStatus.OK)
.body(notificationTemplateService.findAll(pageable));
Expand Down

0 comments on commit c0e984d

Please sign in to comment.