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

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