1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-27 06:01:54 +03:00

Added missing permission checkboxes and improved image AJAX permission responses

This commit is contained in:
Dan Brown
2016-02-27 20:52:46 +00:00
parent 473261be35
commit a14b5c33fd
4 changed files with 28 additions and 13 deletions

View File

@ -68,9 +68,8 @@ abstract class Controller extends BaseController
protected function showPermissionError()
{
Session::flash('error', trans('errors.permission'));
throw new HttpResponseException(
redirect('/')
);
$response = request()->wantsJson() ? response()->json(['error' => trans('errors.permissionJson')], 403) : redirect('/', 403);
throw new HttpResponseException($response);
}
/**