Slightly more clear errors
This commit is contained in:
parent
baeffef24b
commit
5b6d3b8325
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ class AuthenticateUser
|
||||||
public function handle(Request $request, Closure $next)
|
public function handle(Request $request, Closure $next)
|
||||||
{
|
{
|
||||||
if (is_null($request->user()) || ! $request->user()->root_admin) {
|
if (is_null($request->user()) || ! $request->user()->root_admin) {
|
||||||
throw new AccessDeniedHttpException;
|
throw new AccessDeniedHttpException('This account does not have permission to access the API.');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
|
Loading…
Reference in a new issue