From acc1fb81fea804e2a217aa1ef71e4191f56e1e16 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sun, 21 Jul 2019 21:16:15 -0500 Subject: allow self & signed-in local followers to see account when `hide public profile` is set --- app/controllers/accounts_controller.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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' -- cgit