package de.bettinggame.adapter;

import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.ModelAttribute;

import de.bettinggame.ui.Navigation;

/**
 * Abstract base controller.
 */
public abstract class AbstractController {

    /**
     * Returns navigation items
     */
    @ModelAttribute("navigation")
    public Navigation[] getNavigation() {
        boolean authenticated = SecurityContextHolder.getContext().getAuthentication().isAuthenticated();
        Navigation.getNavigationListForAuthentication(authenticated);
        return Navigation.values();
    }
}

@@ -30,80 +30,8 @@
 r;%0A%0A
-import org.springframework.security.core.context.SecurityContextHolder;%0A
 impo
@@ -337,114 +337,8 @@
 ) %7B%0A
-        boolean authenticated = SecurityContextHolder.getContext().getAuthentication().isAuthenticated();%0A
     
@@ -391,21 +391,8 @@
 ion(
-authenticated
 );%0A 

Fix getNavigation()