<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* @Route("/bi")
*
*/
class BIController extends AbstractController
{
/**
* @Route("/index", name="index_bi")
*/
public function index()
{
//se verifica inicio de sesión correcto
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
if ($this->isGranted('ROLE_ADMIN')){
return $this->render('bi/index.html.twig', [
]);
}elseif($this->isGranted('ROLE_TITULAR')){
return $this->redirectToRoute('home', [], Response::HTTP_SEE_OTHER);
}elseif($this->isGranted('ROLE_MUNICIPIO')){
return $this->redirectToRoute('home', [], Response::HTTP_SEE_OTHER);
}
}
}