mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Add custom permission error handling
This commit is contained in:
@@ -48,6 +48,9 @@ class Handler extends ExceptionHandler
|
||||
*/
|
||||
public function render($request, Exception $exception)
|
||||
{
|
||||
if ($exception instanceof \Spatie\Permission\Exceptions\UnauthorizedException) {
|
||||
abort(401);
|
||||
}
|
||||
return parent::render($request, $exception);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user