about summary refs log tree commit diff
path: root/app/controllers/stream_entries_controller.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-06 18:03:30 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-06 18:03:30 +0100
commitf406e01fcf7d69045cf3ad8ea8dea51acd85535b (patch)
treeb1b2c5ac8c44d3b3f4a69e05a707ce641fc4a48a /app/controllers/stream_entries_controller.rb
parent2488162733df7d940e1cb26e5ece534c1078f4c8 (diff)
Add filters for suspended accounts
Diffstat (limited to 'app/controllers/stream_entries_controller.rb')
-rw-r--r--app/controllers/stream_entries_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/stream_entries_controller.rb b/app/controllers/stream_entries_controller.rb
index caab1237d..98d029030 100644
--- a/app/controllers/stream_entries_controller.rb
+++ b/app/controllers/stream_entries_controller.rb
@@ -6,6 +6,7 @@ class StreamEntriesController < ApplicationController
   before_action :set_account
   before_action :set_stream_entry
   before_action :set_link_headers
+  before_action :check_account_suspension
 
   def show
     @type = @stream_entry.activity_type.downcase
@@ -37,4 +38,8 @@ class StreamEntriesController < ApplicationController
   def set_stream_entry
     @stream_entry = @account.stream_entries.find(params[:id])
   end
+
+  def check_account_suspension
+    head 410 if @account.suspended?
+  end
 end