From cffe2ec89c5f2af7d526f43652cfa4a8cbfa3ec6 Mon Sep 17 00:00:00 2001 From: fthvgb1 Date: Sat, 2 Jun 2018 17:09:43 +0800 Subject: [PATCH] fix no permission redirect --- app/Http/Controllers/PagesController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php index 6739082..c6b4839 100644 --- a/app/Http/Controllers/PagesController.php +++ b/app/Http/Controllers/PagesController.php @@ -11,7 +11,8 @@ class PagesController extends Controller public function permissionDenied() { - if (config('administrator.permission')) { + $is_allow = config('administrator.permission'); + if (($is_allow && is_callable($is_allow) && $is_allow() === true) || $is_allow === true) { return redirect(url(config('administrator.uri')), 302); } return view('pages.permission_denied');