v0.10.15h - Fixed admin access
This commit is contained in:
@@ -3,9 +3,7 @@
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
|
||||
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Jenssegers\Agent\Agent;
|
||||
|
||||
class Detector
|
||||
@@ -16,7 +14,11 @@ class Detector
|
||||
|
||||
if($agent->isMobile()) {
|
||||
return view(config("detector.mobilePath") . "." . $viewName, $args);
|
||||
} else if(Auth()->user() !== null) {
|
||||
if (Auth()->user()->can('admin.panel.show') == true)
|
||||
return view(config("detector.defaultPath") . "." . $viewName, $args);
|
||||
}
|
||||
return view(config("detector.defaultPath") . "." . $viewName, $args);
|
||||
|
||||
return view(config("detector.mobilePath") . "." . $viewName, $args);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user