chore: remove the access codes feature flag
This commit is contained in:
1 parent
5d1d7fa19e
commit
813aaf2cf6
10 files changed
+4
-30
No files matched your search
@@ -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 ###
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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: {}
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -49,8 +49,6 @@
|
||||
<p class="text-sm text-gray-500 pb-4">Alle Buchungen verwalten.</p>
|
||||
</a>
|
||||
|
||||
{# The route 404s while the feature is off, so the card has to go with it. #}
|
||||
{% if feature('access_codes') %}
|
||||
<a href="{{ path('app_access_code') }}"
|
||||
class="group flex flex-col rounded-md border border-gray-200 p-6 hover:border-primary hover:bg-gray-50">
|
||||
<div class="flex items-center gap-3 pb-2">
|
||||
@@ -59,7 +57,6 @@
|
||||
</div>
|
||||
<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
|
||||
|
||||
Reference in new issue
Block a user