mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-01-31 12:11:37 +01:00
Fixed bug causing permission error on save and fixed non-gallery image save
This commit is contained in:
parent
4656c12f6d
commit
491f73e0cd
@ -65,8 +65,7 @@ class ImageController extends Controller
|
|||||||
{
|
{
|
||||||
$this->checkPermission('image-create-all');
|
$this->checkPermission('image-create-all');
|
||||||
$this->validate($request, [
|
$this->validate($request, [
|
||||||
'file' => 'image|mimes:jpeg,gif,png',
|
'file' => 'image|mimes:jpeg,gif,png'
|
||||||
'uploaded_to' => 'integer|exists:pages,id'
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$imageUpload = $request->file('file');
|
$imageUpload = $request->file('file');
|
||||||
|
@ -164,7 +164,9 @@ class UserController extends Controller
|
|||||||
|
|
||||||
$user->save();
|
$user->save();
|
||||||
session()->flash('success', 'User successfully updated');
|
session()->flash('success', 'User successfully updated');
|
||||||
return redirect('/settings/users');
|
|
||||||
|
$redirectUrl = userCan('users-manage') ? '/settings/users' : '/settings/users/' . $user->id;
|
||||||
|
return redirect($redirectUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user