Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/Security/AuthenticationEntryPointRedirector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {
}
Expand All @@ -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'));
}
Expand Down
2 changes: 1 addition & 1 deletion templates/content/_buttons.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</button>
<div class="dropdown-menu">
{{ macro.buttonlink(
'action.preview_secure_share'|trans,
'action.preview_secure_share',
path(record.definition.get('record_route'), {'slugOrId': record.id, 'contentTypeSlug': record.contenttype,'secret': secret(record.id)}),
'fa-user-secret',
'btn- dropdown-button mb-0',
Expand Down
Loading