diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-12-06 18:03:30 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-12-06 18:03:30 +0100 |
commit | f406e01fcf7d69045cf3ad8ea8dea51acd85535b (patch) | |
tree | b1b2c5ac8c44d3b3f4a69e05a707ce641fc4a48a /app/controllers/accounts_controller.rb | |
parent | 2488162733df7d940e1cb26e5ece534c1078f4c8 (diff) |
Add filters for suspended accounts
Diffstat (limited to 'app/controllers/accounts_controller.rb')
-rw-r--r-- | app/controllers/accounts_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 46231dd97..57f25a273 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -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 |