diff --git a/.env b/.env index 78710d8..96e2a0d 100644 --- a/.env +++ b/.env @@ -87,10 +87,5 @@ EP_OAUTH2_SCOPES=email,profile,roles ###> app/features ### # Feature flags, read by config/packages/flagception.yaml. Off here and switched on per # deployment in .env.local, so a feature reaches production when its environment says so rather -# than when it is merged. -# -# Door, lift and barrier codes under /access-codes and their admin table. Off until the codes -# have actually been entered: an empty list of codes is worse than no menu entry, because it -# reads as "there are none" to somebody standing at the door. -FEATURE_ACCESS_CODES=false +# than when it is merged. None at the moment. ###< app/features ### diff --git a/.env.dev b/.env.dev index 0a05452..a5084c0 100644 --- a/.env.dev +++ b/.env.dev @@ -8,6 +8,3 @@ APP_SECRET=44660e8fcd421376ebe0f7a7d55e179c # ddev serves the application under this name; anything else is refused. SYMFONY_TRUSTED_HOSTS='^ephub\.ddev\.site$' - -# On for local development, so a fresh checkout sees the feature the branch is about. -FEATURE_ACCESS_CODES=true diff --git a/.env.test b/.env.test index 17d38a6..3ae2840 100644 --- a/.env.test +++ b/.env.test @@ -3,7 +3,3 @@ KERNEL_CLASS='App\Kernel' # Fixed and committed so the test suite is reproducible, and never served: .env.test is excluded # from the deploy rsync and production takes APP_SECRET from its own uncommitted .env.local. APP_SECRET='$ecretf0rt3st' - -# The access-code suite tests the feature, not the gate in front of it, so it runs with the flag -# on. -FEATURE_ACCESS_CODES=true diff --git a/config/packages/flagception.yaml b/config/packages/flagception.yaml index 2951d65..812b212 100644 --- a/config/packages/flagception.yaml +++ b/config/packages/flagception.yaml @@ -4,7 +4,6 @@ # flag gets the state the feature had before it existed. Switching one on is an .env change, not # a release. flagception: - features: - access_codes: - default: false - env: FEATURE_ACCESS_CODES + # None at the moment. A new one is an entry here, with `default: false` and an `env` variable + # declared in .env. + features: {} diff --git a/src/Controller/AccessCode/IndexController.php b/src/Controller/AccessCode/IndexController.php index 77fc821..6dc3f12 100644 --- a/src/Controller/AccessCode/IndexController.php +++ b/src/Controller/AccessCode/IndexController.php @@ -7,7 +7,6 @@ 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; @@ -24,7 +23,6 @@ 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; diff --git a/src/Controller/Admin/AccessCode/CreateController.php b/src/Controller/Admin/AccessCode/CreateController.php index 201df61..7182daf 100644 --- a/src/Controller/Admin/AccessCode/CreateController.php +++ b/src/Controller/Admin/AccessCode/CreateController.php @@ -11,14 +11,12 @@ 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 { diff --git a/src/Controller/Admin/AccessCode/DeleteController.php b/src/Controller/Admin/AccessCode/DeleteController.php index 5a6c1e5..bcc4506 100644 --- a/src/Controller/Admin/AccessCode/DeleteController.php +++ b/src/Controller/Admin/AccessCode/DeleteController.php @@ -10,7 +10,6 @@ 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; @@ -22,7 +21,6 @@ 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 { diff --git a/src/Controller/Admin/AccessCode/EditController.php b/src/Controller/Admin/AccessCode/EditController.php index 64ae2f2..689b61e 100644 --- a/src/Controller/Admin/AccessCode/EditController.php +++ b/src/Controller/Admin/AccessCode/EditController.php @@ -10,14 +10,12 @@ 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 { diff --git a/src/Controller/Admin/AccessCode/IndexController.php b/src/Controller/Admin/AccessCode/IndexController.php index 2b756a0..a915367 100644 --- a/src/Controller/Admin/AccessCode/IndexController.php +++ b/src/Controller/Admin/AccessCode/IndexController.php @@ -8,7 +8,6 @@ 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; @@ -21,7 +20,6 @@ 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 { diff --git a/templates/dashboard/index.html.twig b/templates/dashboard/index.html.twig index 1f15803..5b81d85 100644 --- a/templates/dashboard/index.html.twig +++ b/templates/dashboard/index.html.twig @@ -49,17 +49,14 @@
Alle Buchungen verwalten.
- {# The route 404s while the feature is off, so the card has to go with it. #} - {% if feature('access_codes') %} - -Codes für Türen, Aufzug und Schranke.
- - {% endif %} + +Codes für Türen, Aufzug und Schranke.
+ {# The header is deliberately not navigation, so the dashboard is the only place the