diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/concerns/account_controller_concern.rb | 5 | ||||
-rw-r--r-- | app/controllers/settings/preferences_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/settings/profiles_controller.rb | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/concerns/account_controller_concern.rb b/app/controllers/concerns/account_controller_concern.rb index 4f28941ae..9ac50a5ca 100644 --- a/app/controllers/concerns/account_controller_concern.rb +++ b/app/controllers/concerns/account_controller_concern.rb @@ -11,6 +11,7 @@ module AccountControllerConcern before_action :set_account before_action :check_account_approval before_action :check_account_suspension + before_action :check_account_hidden before_action :set_instance_presenter before_action :set_link_headers end @@ -75,4 +76,8 @@ module AccountControllerConcern gone end end + + def check_account_hidden + not_found if @account.hidden? + end end diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index 503d0fe6e..def3ade1c 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -33,6 +33,7 @@ class Settings::PreferencesController < Settings::BaseController :setting_default_local, :setting_always_local, :setting_rawr_federated, + :setting_hide_stats, :setting_default_sensitive, :setting_default_language, :setting_unfollow_modal, diff --git a/app/controllers/settings/profiles_controller.rb b/app/controllers/settings/profiles_controller.rb index 76d599f08..423d0f13e 100644 --- a/app/controllers/settings/profiles_controller.rb +++ b/app/controllers/settings/profiles_controller.rb @@ -25,7 +25,7 @@ class Settings::ProfilesController < Settings::BaseController private def account_params - params.require(:account).permit(:display_name, :note, :avatar, :header, :locked, :bot, :discoverable, fields_attributes: [:name, :value]) + params.require(:account).permit(:display_name, :note, :avatar, :header, :locked, :hidden, :bot, :discoverable, fields_attributes: [:name, :value]) end def set_account |