From bdbbd06dad298dc3e1a5f568f4a3ff3635b48f22 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Mon, 20 Nov 2017 22:13:37 -0800 Subject: Finalized theme loading and stuff --- app/controllers/settings/deletes_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'app/controllers/settings/deletes_controller.rb') diff --git a/app/controllers/settings/deletes_controller.rb b/app/controllers/settings/deletes_controller.rb index 80002b995..e4cb35a8e 100644 --- a/app/controllers/settings/deletes_controller.rb +++ b/app/controllers/settings/deletes_controller.rb @@ -1,10 +1,8 @@ # frozen_string_literal: true -class Settings::DeletesController < ApplicationController - layout 'admin' +class Settings::DeletesController < Settings::BaseController before_action :check_enabled_deletion - before_action :authenticate_user! def show @confirmation = Form::DeleteConfirmation.new -- cgit From 017fc81caf8f265e5c5543186877437485625795 Mon Sep 17 00:00:00 2001 From: David Yip Date: Wed, 6 Dec 2017 16:19:43 -0600 Subject: Prepend check_enabled_deletion to Settings::DeletesController (#229) The specs for Settings::DeletesController include an example that sets Settings.open_deletion to false and expects the "if deletion is not available, redirect to root" logic to run. However, this spec does not set up a user, which means that the spec (intentionally or otherwise) expects this redirection to work with unauthenticated access. We should preserve that behavior. To do so, we prepend the deletion check to the action chain set up by Settings::BaseController, so that said check occurs before the authenticate_user! check. --- app/controllers/settings/deletes_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/settings/deletes_controller.rb') diff --git a/app/controllers/settings/deletes_controller.rb b/app/controllers/settings/deletes_controller.rb index e4cb35a8e..4c1121471 100644 --- a/app/controllers/settings/deletes_controller.rb +++ b/app/controllers/settings/deletes_controller.rb @@ -2,7 +2,7 @@ class Settings::DeletesController < Settings::BaseController - before_action :check_enabled_deletion + prepend_before_action :check_enabled_deletion def show @confirmation = Form::DeleteConfirmation.new -- cgit