Add filters for suspended accounts
This commit is contained in:
parent
2488162733
commit
f406e01fcf
8 changed files with 35 additions and 12 deletions
|
@ -5,6 +5,8 @@ class AccountsController < ApplicationController
|
|||
|
||||
before_action :set_account
|
||||
before_action :set_link_headers
|
||||
before_action :authenticate_user!, only: [:follow, :unfollow]
|
||||
before_action :check_account_suspension
|
||||
|
||||
def show
|
||||
respond_to do |format|
|
||||
|
@ -50,4 +52,8 @@ class AccountsController < ApplicationController
|
|||
def webfinger_account_url
|
||||
webfinger_url(resource: "acct:#{@account.acct}@#{Rails.configuration.x.local_domain}")
|
||||
end
|
||||
|
||||
def check_account_suspension
|
||||
head 410 if @account.suspended?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue