Add user requirement setting to privacy settings

This commit is contained in:
Andreas Nedbal 2022-11-13 14:26:03 +01:00
parent cdc7e2b9cc
commit 18b3ac641b
2 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,8 @@ class Settings::PrivacyController < ApplicationController
user_attributes = params.require(:user).permit(:privacy_allow_anonymous_questions,
:privacy_allow_public_timeline,
:privacy_allow_stranger_answers,
:privacy_show_in_search)
:privacy_show_in_search,
:privacy_require_user)
if current_user.update(user_attributes)
flash[:success] = t(".success")
else

View File

@ -2,6 +2,7 @@
.card-body
= bootstrap_form_for(current_user, url: settings_privacy_path, method: :patch, data: { turbo: false }) do |f|
= f.check_box :privacy_allow_anonymous_questions
= f.check_box :privacy_require_user
= f.check_box :privacy_allow_public_timeline
= f.check_box :privacy_allow_stranger_answers