protected User getLoggedInUser() { User result = ServiceLocator.locate(UserService.class).getCurrentAuthenticatedUser(); return result; }
public boolean isLoggedIn() { Subject currentSubject = ServiceLocator.locate(UserService.class).getCurrentSubject(); return currentSubject.isAuthenticated(); }