about summary refs log tree commit diff
path: root/app/controllers/settings/migration
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-09-11 20:56:35 +0200
committerGitHub <noreply@github.com>2020-09-11 20:56:35 +0200
commit4e4b3a0c8e69a724e229f028896ce774ef26df3b (patch)
treed5e7e22746d286998972b138dafa260a2482e532 /app/controllers/settings/migration
parente6b272e5c9c227cfbbe375a893f567c5967d669c (diff)
Refactor settings controllers (#14767)
- Disallow suspended accounts from revoking sessions and apps
- Allow suspended accounts to access exports
Diffstat (limited to 'app/controllers/settings/migration')
-rw-r--r--app/controllers/settings/migration/redirects_controller.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/app/controllers/settings/migration/redirects_controller.rb b/app/controllers/settings/migration/redirects_controller.rb
index 97193ade0..6d469f384 100644
--- a/app/controllers/settings/migration/redirects_controller.rb
+++ b/app/controllers/settings/migration/redirects_controller.rb
@@ -1,13 +1,10 @@
 # frozen_string_literal: true
 
 class Settings::Migration::RedirectsController < Settings::BaseController
-  layout 'admin'
+  skip_before_action :require_functional!
 
-  before_action :authenticate_user!
   before_action :require_not_suspended!
 
-  skip_before_action :require_functional!
-
   def new
     @redirect = Form::Redirect.new
   end
@@ -38,8 +35,4 @@ class Settings::Migration::RedirectsController < Settings::BaseController
   def resource_params
     params.require(:form_redirect).permit(:acct, :current_password, :current_username)
   end
-
-  def require_not_suspended!
-    forbidden if current_account.suspended?
-  end
 end