diff options
author | ThibG <thib@sitedethib.com> | 2019-07-21 00:53:28 +0200 |
---|---|---|
committer | Holly 'Frinkel' Lotor <admin@frinkel.tech> | 2020-01-20 16:55:55 -0500 |
commit | b0630ddc8261250c5edbf2907648695041649e98 (patch) | |
tree | 9ca374e4e98598efced200e4a993875245ab93b6 /app/policies | |
parent | 9447566b8ed8e532c13dd97ecd53681029fdcec0 (diff) |
Original upstream merge
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/status_policy.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/policies/status_policy.rb b/app/policies/status_policy.rb index 311ecf5ed..d5dad6350 100644 --- a/app/policies/status_policy.rb +++ b/app/policies/status_policy.rb @@ -19,7 +19,7 @@ class StatusPolicy < ApplicationPolicy if private? following_author? && still_accessible? else - author_allows_anon? && still_accessible? && !author_blocking? || following_author? + author_allows_anon? && still_accessible? && (!author_blocking? && !author_blocking_domain?) || following_author? end end @@ -65,6 +65,12 @@ class StatusPolicy < ApplicationPolicy end end + def author_blocking_domain? + return false if current_account.nil? || current_account.domain.nil? + + author.domain_blocking?(current_account.domain) + end + def blocking_author? return false if current_account.nil? |