fix no permission redirect

This commit is contained in:
fthvgb1 2018-06-02 17:09:43 +08:00
parent e36e438d9e
commit cffe2ec89c

View File

@ -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');