From f6c28eefbd7be9798ac77602ffce4f2a17be25c0 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 6 Nov 2022 15:00:28 +0100 Subject: [PATCH] Add inbox locking setting to privacy settings --- app/controllers/settings/privacy_controller.rb | 3 ++- app/views/settings/privacy/edit.html.haml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/settings/privacy_controller.rb b/app/controllers/settings/privacy_controller.rb index f85201f1..7921ef08 100644 --- a/app/controllers/settings/privacy_controller.rb +++ b/app/controllers/settings/privacy_controller.rb @@ -6,7 +6,8 @@ class Settings::PrivacyController < ApplicationController def edit; end def update - user_attributes = params.require(:user).permit(:privacy_allow_anonymous_questions, + user_attributes = params.require(:user).permit(:privacy_lock_inbox, + :privacy_allow_anonymous_questions, :privacy_allow_public_timeline, :privacy_allow_stranger_answers, :privacy_show_in_search) diff --git a/app/views/settings/privacy/edit.html.haml b/app/views/settings/privacy/edit.html.haml index e2287aad..55465898 100644 --- a/app/views/settings/privacy/edit.html.haml +++ b/app/views/settings/privacy/edit.html.haml @@ -1,6 +1,7 @@ .card .card-body = bootstrap_form_for(current_user, url: settings_privacy_path, method: :patch, data: { turbo: false }) do |f| + = f.check_box :privacy_lock_inbox = f.check_box :privacy_allow_anonymous_questions = f.check_box :privacy_allow_public_timeline = f.check_box :privacy_allow_stranger_answers