1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-06 14:16:46 +02:00

V2.4.2 switch middleware for restricted website from authorization to authentiction

This commit is contained in:
trendschau
2024-04-23 18:33:38 +02:00
parent fab1b46b85
commit ee9440cb1a

View File

@@ -92,7 +92,7 @@ if(isset($routes['web']) && !empty($routes['web']))
if(isset($settings['access']) && $settings['access'] != '')
{
# if access for website is restricted
$app->get('/[{route:.*}]', ControllerWebFrontend::class . ':index')->setName('home')->add(new CspHeadersMiddleware($settings, $cspFromPlugins, $cspFromTheme))->add(new WebAuthorization($routeParser, $acl, 'account', 'read'));
$app->get('/[{route:.*}]', ControllerWebFrontend::class . ':index')->setName('home')->add(new CspHeadersMiddleware($settings, $cspFromPlugins, $cspFromTheme))->add(new WebRedirectIfUnauthenticated($routeParser));
}
else
{