parent
fb2909a1c7
commit
6409fffdad
22 changed files with 143 additions and 166 deletions
app/Http/Middleware
|
@ -11,7 +11,7 @@ namespace Pterodactyl\Http\Middleware;
|
|||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
|
||||
class AdminAuthenticate
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ class AdminAuthenticate
|
|||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
if (! $request->user() || ! $request->user()->root_admin) {
|
||||
throw new HttpException(403, 'Access Denied');
|
||||
throw new AccessDeniedHttpException;
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue