about summary refs log tree commit diff
path: root/app/controllers/settings/deletes_controller.rb
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-07-23 20:54:15 -0700
committerReverite <github@reverite.sh>2019-07-23 20:54:15 -0700
commitfee3abd1dce8f437e3514cb03816ae50862b3c4c (patch)
tree72e19e9e748edce7024737cfb70f9088346058bd /app/controllers/settings/deletes_controller.rb
parent9148c3e8479e59df9f9a4889ef58a959f60f6606 (diff)
parent08325db62bcc4d5d530513c615bc1c733f166239 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/controllers/settings/deletes_controller.rb')
-rw-r--r--app/controllers/settings/deletes_controller.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/controllers/settings/deletes_controller.rb b/app/controllers/settings/deletes_controller.rb
index 4c1121471..97fe4d328 100644
--- a/app/controllers/settings/deletes_controller.rb
+++ b/app/controllers/settings/deletes_controller.rb
@@ -1,8 +1,13 @@
 # frozen_string_literal: true
 
 class Settings::DeletesController < Settings::BaseController
+  layout 'admin'
 
-  prepend_before_action :check_enabled_deletion
+  before_action :check_enabled_deletion
+  before_action :authenticate_user!
+  before_action :require_not_suspended!
+
+  skip_before_action :require_functional!
 
   def show
     @confirmation = Form::DeleteConfirmation.new
@@ -27,4 +32,8 @@ class Settings::DeletesController < Settings::BaseController
   def delete_params
     params.require(:form_delete_confirmation).permit(:password)
   end
+
+  def require_not_suspended!
+    forbidden if current_account.suspended?
+  end
 end