0
0
Fork 0

Add filters for suspended accounts

This commit is contained in:
Eugen Rochko 2016-12-06 18:03:30 +01:00
parent 2488162733
commit f406e01fcf
8 changed files with 35 additions and 12 deletions

View file

@ -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