diff --git a/src/Cacic/CommonBundle/Controller/DefaultController.php b/src/Cacic/CommonBundle/Controller/DefaultController.php index b296f25..e9f7f88 100644 --- a/src/Cacic/CommonBundle/Controller/DefaultController.php +++ b/src/Cacic/CommonBundle/Controller/DefaultController.php @@ -13,6 +13,9 @@ class DefaultController extends Controller */ public function indexAction() { + $usuario = $this->getUser()->getIdUsuario(); + $nivel = $this->getDoctrine()->getRepository('CacicCommonBundle:Usuario' )->nivel($usuario); + $estatisticas = array( 'totalCompMonitorados' => $this->getDoctrine()->getRepository('CacicCommonBundle:Computador')->countAll(), 'totalInsucessosInstalacao' => $this->getDoctrine()->getRepository('CacicCommonBundle:InsucessoInstalacao')->countAll(), @@ -25,7 +28,8 @@ class DefaultController extends Controller return $this->render( 'CacicCommonBundle:Default:index.html.twig', array( - 'estatisticas' => $estatisticas + 'estatisticas' => $estatisticas, + 'nivel' => $nivel[0] ) ); } -- libgit2 0.21.2