From 60f7f95bbafc9a210ff3db61390ad12430a6fcaa Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Tue, 16 Apr 2024 14:45:10 +1000 Subject: [PATCH] Enable user-based middleware These will become available in the RainLab.User v3 coming shortly --- src/Foundation/Http/Kernel.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Foundation/Http/Kernel.php b/src/Foundation/Http/Kernel.php index ecf03c536..b364ed777 100644 --- a/src/Foundation/Http/Kernel.php +++ b/src/Foundation/Http/Kernel.php @@ -41,10 +41,10 @@ class Kernel extends HttpKernel * @var array */ protected $routeMiddleware = [ - // 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, - // 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, + 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, - // 'can' => \Illuminate\Auth\Middleware\Authorize::class, + 'can' => \Illuminate\Auth\Middleware\Authorize::class, // 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, ]; @@ -79,9 +79,9 @@ class Kernel extends HttpKernel protected $middlewarePriority = [ \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, - // \Illuminate\Auth\Middleware\Authenticate::class, - // \Illuminate\Session\Middleware\AuthenticateSession::class, + \Illuminate\Auth\Middleware\Authenticate::class, + \Illuminate\Session\Middleware\AuthenticateSession::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, - // \Illuminate\Auth\Middleware\Authorize::class, + \Illuminate\Auth\Middleware\Authorize::class, ]; }