about summary refs log tree commit diff
path: root/app/policies
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-09-11 15:16:29 +0200
committerGitHub <noreply@github.com>2020-09-11 15:16:29 +0200
commite6b272e5c9c227cfbbe375a893f567c5967d669c (patch)
tree83aa2fe629cc54225531852fe7020388277ba040 /app/policies
parente6d67f85e288a5c3137c9fc09f99c9051544d87c (diff)
Change REST API to return empty data for suspended accounts (#14765)
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/status_policy.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/policies/status_policy.rb b/app/policies/status_policy.rb
index 3d4e50d37..bcf9c3395 100644
--- a/app/policies/status_policy.rb
+++ b/app/policies/status_policy.rb
@@ -12,6 +12,8 @@ class StatusPolicy < ApplicationPolicy
   end
 
   def show?
+    return false if author.suspended?
+
     if requires_mention?
       owned? || mention_exists?
     elsif private?