Fix isAdmin and added 401 template

This commit is contained in:
Joseph Cohen
2015-01-23 17:06:46 -06:00
parent 787ecde0ea
commit 90c8551010
6 changed files with 42 additions and 5 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ class AdminFilter
public function filter(Route $route, Request $request)
{
if (!Auth::check() || (Auth::check() && !Auth::user()->isAdmin)) {
return Response::make('Unauthorized', 401);
return Response::view('errors.401', ['pageTitle' => trans('errors.unauthorized.title')], 401);
}
}
}