Skip to content

Commit

Permalink
Update CmsServiceProvider.php
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-jennings authored Sep 30, 2019
1 parent bb71f35 commit 7f8e1a4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/CmsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,17 @@ public function boot(Router $router, Kernel $kernel)
UploadChecks::class
];
$routerMiddleware = [
'coaster.admin' => AdminAuth::class,
'coaster.guest' => GuestAuth::class,
'coaster.secure_upload' => SecureUpload::class,
'coaster.cms' => [],
'coaster.admin' => [AdminAuth::class],
'coaster.guest' => [GuestAuth::class],
'coaster.secure_upload' => [SecureUpload::class],
];
event(new LoadMiddleware($globalMiddleware, $routerMiddleware));
foreach ($globalMiddleware as $globalMiddlewareClass) {
$kernel->pushMiddleware($globalMiddlewareClass);
}
foreach ($routerMiddleware as $routerMiddlewareName => $routerMiddlewareClass) {
$router->middlewareGroup($routerMiddlewareName, [$routerMiddlewareClass]);
$router->middlewareGroup($routerMiddlewareName, $routerMiddlewareClass);
}

// use coater guard and user provider
Expand Down

0 comments on commit 7f8e1a4

Please sign in to comment.