mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Demo mode: Updated my account access to be more selective
This commit is contained in:
parent
e006f9674f
commit
49b286cd34
@ -20,7 +20,6 @@ class UserAccountController extends Controller
|
||||
) {
|
||||
$this->middleware(function (Request $request, Closure $next) {
|
||||
$this->preventGuestAccess();
|
||||
$this->preventAccessInDemoMode();
|
||||
return $next($request);
|
||||
});
|
||||
}
|
||||
@ -53,6 +52,8 @@ class UserAccountController extends Controller
|
||||
*/
|
||||
public function updateProfile(Request $request, ImageRepo $imageRepo)
|
||||
{
|
||||
$this->preventAccessInDemoMode();
|
||||
|
||||
$user = user();
|
||||
$validated = $this->validate($request, [
|
||||
'name' => ['min:2', 'max:100'],
|
||||
@ -143,6 +144,7 @@ class UserAccountController extends Controller
|
||||
*/
|
||||
public function updateNotifications(Request $request)
|
||||
{
|
||||
$this->preventAccessInDemoMode();
|
||||
$this->checkPermission('receive-notifications');
|
||||
$data = $this->validate($request, [
|
||||
'preferences' => ['required', 'array'],
|
||||
@ -178,6 +180,8 @@ class UserAccountController extends Controller
|
||||
*/
|
||||
public function updatePassword(Request $request)
|
||||
{
|
||||
$this->preventAccessInDemoMode();
|
||||
|
||||
if (config('auth.method') !== 'standard') {
|
||||
$this->showPermissionError();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user