If I have a repository setup like the following, making use of Spring Data REST, I can access the data at /receipts and see all data. However, I want to only return data fo
If you use Spring Security you can use this approach:
@PreAuthorize("isFullyAuthenticated() && (#userName == principal.username)") public List findByUserName(@Param("userName")String userName);