SanjinKurelic/PaintingsGarage

Security - fix permission for getCurrentAuthor endpoint

Closed this issue · 0 comments

Endpoint getCurrentAuthor can only be called if user is registered.

Enable Security AOP in SecurityConfig by using: @EnableGlobalMethodSecurity(prePostEnabled = true)

Endpoint is secured using: @PreAuthorize("hasRole('USER')")