November 2017
Intermediate to advanced
542 pages
14h 24m
English
Just as we were able to leverage the parameters to the method, we can also leverage the returned value of the method call. Let's update the getEvent method to meet the following constraints on the returned value:
Add the following code to the CalendarService interface:
@PostAuthorize("hasRole('ROLE_ADMIN') or " + "principal.username == returnObject.owner.email or " + "principal.username == returnObject.attendee.email") Event getEvent(int eventId);
Now, try logging in with the username user1@example.com ...
Read now
Unlock full access