X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/371779205a29816b90fcf31bb6dba609aeb192fc..refs/pull/4467/head:/app/Users/Controllers/UserPreferencesController.php diff --git a/app/Users/Controllers/UserPreferencesController.php b/app/Users/Controllers/UserPreferencesController.php index d9ee50ca7..503aeaeb0 100644 --- a/app/Users/Controllers/UserPreferencesController.php +++ b/app/Users/Controllers/UserPreferencesController.php @@ -33,6 +33,8 @@ class UserPreferencesController extends Controller $shortcuts = UserShortcutMap::fromUserPreferences(); $enabled = setting()->getForCurrentUser('ui-shortcuts-enabled', false); + $this->setPageTitle(trans('preferences.shortcuts_interface')); + return view('users.preferences.shortcuts', [ 'shortcuts' => $shortcuts, 'enabled' => $enabled, @@ -62,6 +64,7 @@ class UserPreferencesController extends Controller public function showNotifications(PermissionApplicator $permissions) { $this->checkPermission('receive-notifications'); + $this->preventGuestAccess(); $preferences = (new UserNotificationPreferences(user())); @@ -69,6 +72,7 @@ class UserPreferencesController extends Controller $query = $permissions->restrictEntityRelationQuery($query, 'watches', 'watchable_id', 'watchable_type'); $watches = $query->with('watchable')->paginate(20); + $this->setPageTitle(trans('preferences.notifications')); return view('users.preferences.notifications', [ 'preferences' => $preferences, 'watches' => $watches, @@ -81,6 +85,7 @@ class UserPreferencesController extends Controller public function updateNotifications(Request $request) { $this->checkPermission('receive-notifications'); + $this->preventGuestAccess(); $data = $this->validate($request, [ 'preferences' => ['required', 'array'], 'preferences.*' => ['required', 'string'],