Ojs\AdminBundle\Controller\AdminController::dashboardCheckAction PHP 메소드

dashboardCheckAction() 공개 메소드

public dashboardCheckAction ( ) : RedirectResponse
리턴 Symfony\Component\HttpFoundation\RedirectResponse
    public function dashboardCheckAction()
    {
        if ($this->getUser()) {
            if ($this->getUser()->isAdmin()) {
                return $this->redirectToRoute('ojs_admin_dashboard');
            } else {
                return $this->redirectToRoute('ojs_user_index');
            }
        } else {
            throw new AccessDeniedException('You are not allowed to see this page');
        }
    }