feat: put the access codes behind a feature flag

This commit is contained in:
fromme committed 2026-09-25 16:15:02 +02:00
1 parent afa3f17d77
commit ed5826128e
15 files changed
+256 -9

No files matched your search

@@ -7,6 +7,7 @@ namespace App\Controller\AccessCode;
use App\Controller\Traits\CurrentUserTrait;
use App\Entity\AccessCode;
use App\Repository\AccessCodeRepository;
use Flagception\Bundle\FlagceptionBundle\Attribute\Feature;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
@@ -23,6 +24,7 @@ use Symfony\Component\Routing\Attribute\Route;
* has been replaced is gone the day its successor takes over. Both would only be one more number
* on the screen for somebody to mistype.
*/
#[Feature('access_codes')]
final class IndexController extends AbstractController
{
use CurrentUserTrait;
@@ -11,12 +11,14 @@ use App\Htmx\HxRedirectResponse;
use App\Security\Role;
use App\Service\AuditLogger;
use Doctrine\ORM\EntityManagerInterface;
use Flagception\Bundle\FlagceptionBundle\Attribute\Feature;
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;
#[Feature('access_codes')]
#[IsGranted(Role::ADMIN)]
final class CreateController extends AbstractController
{
@@ -10,6 +10,7 @@ use App\Htmx\HxRedirectResponse;
use App\Security\Role;
use App\Service\AuditLogger;
use Doctrine\ORM\EntityManagerInterface;
use Flagception\Bundle\FlagceptionBundle\Attribute\Feature;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -21,6 +22,7 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
* confirmation, which is there because a deleted code is not recoverable from the screen that
* deleted it.
*/
#[Feature('access_codes')]
#[IsGranted(Role::ADMIN)]
final class DeleteController extends AbstractController
{
@@ -10,12 +10,14 @@ use App\Htmx\HxRedirectResponse;
use App\Security\Role;
use App\Service\AuditLogger;
use Doctrine\ORM\EntityManagerInterface;
use Flagception\Bundle\FlagceptionBundle\Attribute\Feature;
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;
#[Feature('access_codes')]
#[IsGranted(Role::ADMIN)]
final class EditController extends AbstractController
{
@@ -8,6 +8,7 @@ use App\Controller\Traits\CurrentUserTrait;
use App\Entity\AccessCode;
use App\Repository\AccessCodeRepository;
use App\Security\Role;
use Flagception\Bundle\FlagceptionBundle\Attribute\Feature;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
@@ -20,6 +21,7 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
* Which is which is a question about today rather than a stored flag, and it is answered here
* because it is a question about the whole list: a template cannot look back over its own rows.
*/
#[Feature('access_codes')]
#[IsGranted(Role::ADMIN)]
final class IndexController extends AbstractController
{