diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-21 21:16:15 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-21 22:17:58 -0500 |
commit | acc1fb81fea804e2a217aa1ef71e4191f56e1e16 (patch) | |
tree | caeb001129c6e5441c432d9f0e33602f99949a45 /app/controllers | |
parent | 47d9a34401da3dc1e6634de4b25fc942149b4891 (diff) |
allow self & signed-in local followers to see account when `hide public profile` is set
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/accounts_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 94eef62e2..25a8e8e30 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -11,7 +11,12 @@ class AccountsController < ApplicationController respond_to do |format| format.html do use_pack 'public' - not_found if @account.hidden || (@account&.user && @account.user.hides_public_profile?) + unless current_account && current_account.id == @account.id + not_found if @account.hidden + if @account&.user && @account.user.hides_public_profile? + not_found unless current_account && current_account.following?(@account)) + end + end mark_cacheable! unless user_signed_in? @body_classes = 'with-modals' |