diff --git a/src/Security/AuthenticationEntryPointRedirector.php b/src/Security/AuthenticationEntryPointRedirector.php index 34a8455ae7..3f1363faef 100644 --- a/src/Security/AuthenticationEntryPointRedirector.php +++ b/src/Security/AuthenticationEntryPointRedirector.php @@ -8,12 +8,10 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; -use Symfony\Contracts\Translation\TranslatorInterface; class AuthenticationEntryPointRedirector implements AuthenticationEntryPointInterface { public function __construct( - private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator ) { } @@ -23,7 +21,7 @@ public function start(Request $request, ?AuthenticationException $authException // add a custom flash message and redirect to the login page /** @var Session $session */ $session = $request->getSession(); - $session->getFlashBag()->add('warning', $this->translator->trans('You have to login in order to access this page.', [], 'security')); + $session->getFlashBag()->add('warning', 'You have to login in order to access this page.'); return new RedirectResponse($this->urlGenerator->generate('bolt_login')); } diff --git a/templates/content/_buttons.html.twig b/templates/content/_buttons.html.twig index 4aa14d8232..7010b56a04 100644 --- a/templates/content/_buttons.html.twig +++ b/templates/content/_buttons.html.twig @@ -31,7 +31,7 @@