|
|
@ -3,6 +3,7 @@
|
|
|
|
class Settings::DeletesController < ApplicationController
|
|
|
|
class Settings::DeletesController < ApplicationController
|
|
|
|
layout 'admin'
|
|
|
|
layout 'admin'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
before_action :check_enabled_deletion
|
|
|
|
before_action :authenticate_user!
|
|
|
|
before_action :authenticate_user!
|
|
|
|
|
|
|
|
|
|
|
|
def show
|
|
|
|
def show
|
|
|
@ -21,6 +22,10 @@ class Settings::DeletesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_enabled_deletion
|
|
|
|
|
|
|
|
redirect_to root_path unless Setting.open_deletion
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def delete_params
|
|
|
|
def delete_params
|
|
|
|
params.require(:form_delete_confirmation).permit(:password)
|
|
|
|
params.require(:form_delete_confirmation).permit(:password)
|
|
|
|
end
|
|
|
|
end
|
|
|
|