From a117e04ee45200453d08871916a4919726637e02 Mon Sep 17 00:00:00 2001 From: A1Gard Date: Sat, 26 Oct 2024 14:16:18 +0330 Subject: [PATCH] fixed some user bug --- app/Http/Middleware/Acl.php | 3 +++ resources/views/admin/users/user-form.blade.php | 2 +- resources/views/components/panel-top-navbar.blade.php | 2 +- routes/web.php | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Http/Middleware/Acl.php b/app/Http/Middleware/Acl.php index 154c61c..d4ba52e 100644 --- a/app/Http/Middleware/Acl.php +++ b/app/Http/Middleware/Acl.php @@ -40,6 +40,9 @@ class Acl } } } + if (auth()->user()->accesses()->count() == 0){ + return redirect()->route('admin.logout')->with(['message' => "You don't have any access to login"]); + } } } return $next($request); diff --git a/resources/views/admin/users/user-form.blade.php b/resources/views/admin/users/user-form.blade.php index a12de42..156a68b 100644 --- a/resources/views/admin/users/user-form.blade.php +++ b/resources/views/admin/users/user-form.blade.php @@ -36,7 +36,7 @@ {{__("Avatar")}} - + diff --git a/resources/views/components/panel-top-navbar.blade.php b/resources/views/components/panel-top-navbar.blade.php index 36bf6bf..32c321c 100644 --- a/resources/views/components/panel-top-navbar.blade.php +++ b/resources/views/components/panel-top-navbar.blade.php @@ -38,7 +38,7 @@