how does the spring acl work with optional?
I wrote next:
@PostAuthorize("hasPermission(returnObject, 'read')")
Optional<Schedule> get(@Nonnull String id);
and it throws an error:
Could not extract identity from object Optional[Schedule
I find the solution: @PostAuthorize("hasPermission(returnObject.get(), 'read')") Optional<Schedule> get(@Nonnull String id);
Обсуждают сегодня