about summary refs log tree commit diff
path: root/app/controllers/accounts_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/accounts_controller.rb')
-rw-r--r--app/controllers/accounts_controller.rb6
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