<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
use Symfony\Component\HttpFoundation\Response;
class SettingsController extends AbstractController
{
/**
* @Route("/", name="settings")
*/
public function index()
{
if (!$this->isGranted('ROLE_ADMIN') && !$this->isGranted('ROLE_CHANCELLOR')) {
return $this->redirect('/meeting');
}
if ($this->isGranted('ROLE_CHANCELLOR')) {
return $this->redirectToRoute('group_index');
}
return $this->redirectToRoute('user_index');
}
}