Check user authenticated for config pages

master
Julien Rosset 1 month ago
parent eb9844fe70
commit a278133eeb

@ -11,12 +11,17 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
/**
* Controller for the configuration pages of machines
*/
#[Route('/Config/Machine')]
#[IsGranted('IS_AUTHENTICATED')]
class MachineController extends AbstractController {
/**
* @var EntityManagerInterface The entity manager
*/
private readonly EntityManagerInterface $entityManager;
/**
* @var MachineRepository The machine repository

@ -14,12 +14,17 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
/**
* Controller for the configuration pages of material
*/
#[Route('/Config/Material')]
#[IsGranted('IS_AUTHENTICATED')]
class MaterialController extends AbstractController {
/**
* @var EntityManagerInterface The entity manager
*/
private readonly EntityManagerInterface $entityManager;
/**
* @var MaterialRepository The material repository

@ -11,12 +11,17 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
/**
* Controller for the configuration pages of material types
*/
#[Route('/Config/MaterialType')]
#[IsGranted('IS_AUTHENTICATED')]
class MaterialTypeController extends AbstractController {
/**
* @var EntityManagerInterface The entity manager
*/
private readonly EntityManagerInterface $entityManager;
/**
* @var MaterialTypeRepository The material type repository

Loading…
Cancel
Save