Add filters for suspended accounts
This commit is contained in:
parent
2488162733
commit
f406e01fcf
8 changed files with 35 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue