chore: remove the access codes feature flag

This commit is contained in:
fromme committed 2026-10-05 17:14:17 +02:00
1 parent 5d1d7fa19e
commit 813aaf2cf6
10 files changed
+12 -38

No files matched your search

+1 -6
View File
@@ -87,10 +87,5 @@ EP_OAUTH2_SCOPES=email,profile,roles
###> app/features ### ###> app/features ###
# Feature flags, read by config/packages/flagception.yaml. Off here and switched on per # 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 # deployment in .env.local, so a feature reaches production when its environment says so rather
# than when it is merged. # than when it is merged. None at the moment.
#
# 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
###< app/features ### ###< app/features ###
-3
View File
@@ -8,6 +8,3 @@ APP_SECRET=44660e8fcd421376ebe0f7a7d55e179c
# ddev serves the application under this name; anything else is refused. # ddev serves the application under this name; anything else is refused.
SYMFONY_TRUSTED_HOSTS='^ephub\.ddev\.site$' 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
-4
View File
@@ -3,7 +3,3 @@ KERNEL_CLASS='App\Kernel'
# Fixed and committed so the test suite is reproducible, and never served: .env.test is excluded # 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. # from the deploy rsync and production takes APP_SECRET from its own uncommitted .env.local.
APP_SECRET='$ecretf0rt3st' 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
+3 -4
View File
@@ -4,7 +4,6 @@
# flag gets the state the feature had before it existed. Switching one on is an .env change, not # flag gets the state the feature had before it existed. Switching one on is an .env change, not
# a release. # a release.
flagception: flagception:
features: # None at the moment. A new one is an entry here, with `default: false` and an `env` variable
access_codes: # declared in .env.
default: false features: {}
env: FEATURE_ACCESS_CODES
@@ -7,7 +7,6 @@ namespace App\Controller\AccessCode;
use App\Controller\Traits\CurrentUserTrait; use App\Controller\Traits\CurrentUserTrait;
use App\Entity\AccessCode; use App\Entity\AccessCode;
use App\Repository\AccessCodeRepository; use App\Repository\AccessCodeRepository;
use Flagception\Bundle\FlagceptionBundle\Attribute\Feature;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route; 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 * 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. * on the screen for somebody to mistype.
*/ */
#[Feature('access_codes')]
final class IndexController extends AbstractController final class IndexController extends AbstractController
{ {
use CurrentUserTrait; use CurrentUserTrait;
@@ -11,14 +11,12 @@ use App\Htmx\HxRedirectResponse;
use App\Security\Role; use App\Security\Role;
use App\Service\AuditLogger; use App\Service\AuditLogger;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Flagception\Bundle\FlagceptionBundle\Attribute\Feature;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
#[Feature('access_codes')]
#[IsGranted(Role::ADMIN)] #[IsGranted(Role::ADMIN)]
final class CreateController extends AbstractController final class CreateController extends AbstractController
{ {
@@ -10,7 +10,6 @@ use App\Htmx\HxRedirectResponse;
use App\Security\Role; use App\Security\Role;
use App\Service\AuditLogger; use App\Service\AuditLogger;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Flagception\Bundle\FlagceptionBundle\Attribute\Feature;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; 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 * confirmation, which is there because a deleted code is not recoverable from the screen that
* deleted it. * deleted it.
*/ */
#[Feature('access_codes')]
#[IsGranted(Role::ADMIN)] #[IsGranted(Role::ADMIN)]
final class DeleteController extends AbstractController final class DeleteController extends AbstractController
{ {
@@ -10,14 +10,12 @@ use App\Htmx\HxRedirectResponse;
use App\Security\Role; use App\Security\Role;
use App\Service\AuditLogger; use App\Service\AuditLogger;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Flagception\Bundle\FlagceptionBundle\Attribute\Feature;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
#[Feature('access_codes')]
#[IsGranted(Role::ADMIN)] #[IsGranted(Role::ADMIN)]
final class EditController extends AbstractController final class EditController extends AbstractController
{ {
@@ -8,7 +8,6 @@ use App\Controller\Traits\CurrentUserTrait;
use App\Entity\AccessCode; use App\Entity\AccessCode;
use App\Repository\AccessCodeRepository; use App\Repository\AccessCodeRepository;
use App\Security\Role; use App\Security\Role;
use Flagception\Bundle\FlagceptionBundle\Attribute\Feature;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route; 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 * 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. * because it is a question about the whole list: a template cannot look back over its own rows.
*/ */
#[Feature('access_codes')]
#[IsGranted(Role::ADMIN)] #[IsGranted(Role::ADMIN)]
final class IndexController extends AbstractController final class IndexController extends AbstractController
{ {
+8 -11
View File
@@ -49,17 +49,14 @@
<p class="text-sm text-gray-500 pb-4">Alle Buchungen verwalten.</p> <p class="text-sm text-gray-500 pb-4">Alle Buchungen verwalten.</p>
</a> </a>
{# The route 404s while the feature is off, so the card has to go with it. #} <a href="{{ path('app_access_code') }}"
{% if feature('access_codes') %} class="group flex flex-col rounded-md border border-gray-200 p-6 hover:border-primary hover:bg-gray-50">
<a href="{{ path('app_access_code') }}" <div class="flex items-center gap-3 pb-2">
class="group flex flex-col rounded-md border border-gray-200 p-6 hover:border-primary hover:bg-gray-50"> {{ ux_icon('lucide:key-round', { class: 'h-6 w-6 shrink-0 text-primary' }) }}
<div class="flex items-center gap-3 pb-2"> <span class="text-lg font-bold">Zugangscodes</span>
{{ ux_icon('lucide:key-round', { class: 'h-6 w-6 shrink-0 text-primary' }) }} </div>
<span class="text-lg font-bold">Zugangscodes</span> <p class="text-sm text-gray-500 pb-4">Codes für Türen, Aufzug und Schranke.</p>
</div> </a>
<p class="text-sm text-gray-500 pb-4">Codes für Türen, Aufzug und Schranke.</p>
</a>
{% endif %}
{# {#
The header is deliberately not navigation, so the dashboard is the only place the The header is deliberately not navigation, so the dashboard is the only place the