v0.10.15j - Fixed admin access
This commit is contained in:
@@ -18,6 +18,8 @@ class Detector
|
|||||||
if (Auth()->user()->can('admin.panel.show') == true)
|
if (Auth()->user()->can('admin.panel.show') == true)
|
||||||
return view(config("detector.defaultPath") . "." . $viewName, $args);
|
return view(config("detector.defaultPath") . "." . $viewName, $args);
|
||||||
}
|
}
|
||||||
|
if($viewName == "users.login" || $viewName == "users.logout")
|
||||||
|
return view(config("detector.mobilePath") . "." . $viewName, $args);
|
||||||
|
|
||||||
return view("errors.403", $args);
|
return view("errors.403", $args);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ class DetectorServiceProvider extends ServiceProvider
|
|||||||
if(Auth()->user()->can('admin.panel.show') == true)
|
if(Auth()->user()->can('admin.panel.show') == true)
|
||||||
return view(config("detector.defaultPath") . "." . $view, $args);
|
return view(config("detector.defaultPath") . "." . $view, $args);
|
||||||
}
|
}
|
||||||
|
if($view == "users.login" || $view == "users.logout")
|
||||||
|
return view(config("detector.mobilePath") . "." . $view, $args);
|
||||||
|
|
||||||
return view("errors.403", $args);
|
return view("errors.403", $args);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user