}
private CurrentUserDto getCurrentUserDto() {
Boolean isLoggedIn = userService.isUserLoggedIn();
CurrentUserDto currentUser = new CurrentUserDto(isLoggedIn, getUser());
currentUser.setLogoutUrl(userService.createLogoutURL("/"));
currentUser.setLoginUrl(userService.createLoginURL("/"));
if (isLoggedIn) {
currentUser.setIsAdmin(userService.isUserAdmin());
currentUser.setNickname(userService.getCurrentUser().getNickname());
}
return currentUser;
}