BookStack\Http\Controllers\Controller::showPermissionError PHP Method

showPermissionError() protected method

the error as a notification.
protected showPermissionError ( )
    protected function showPermissionError()
    {
        if (request()->wantsJson()) {
            $response = response()->json(['error' => trans('errors.permissionJson')], 403);
        } else {
            $response = redirect('/');
            session()->flash('error', trans('errors.permission'));
        }
        throw new HttpResponseException($response);
    }