Add filters for suspended accounts
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user