diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-03-25 03:06:19 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:21 -0500 |
commit | 6614d42c6e3aedd51b0e9b2a2bb5d6f0a19fcad0 (patch) | |
tree | 35c345b0d67cd385fd606060848ee15a0f00620f /app/controllers | |
parent | 90d2280dfec9c2fa3a257b89ea3dfb557168f2d3 (diff) |
hidden accounts + stats hiding
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 |