@ -1,6 +1,9 @@
# frozen_string_literal: true
class Settings::ApplicationsController < Settings::BaseController
layout 'admin'
before_action :authenticate_user!
before_action :set_application, only: [:show, :update, :destroy, :regenerate]
before_action :prepare_scopes, only: [:create, :update]
@ -1,12 +1,11 @@
class Settings::BaseController < ApplicationController
before_action :set_pack
before_action :set_body_classes
private
def set_pack
use_pack 'settings'
end
@ -1,8 +1,10 @@
class Settings::DeletesController < Settings::BaseController
prepend_before_action :check_enabled_deletion
before_action :check_enabled_deletion
before_action :require_not_suspended!
skip_before_action :require_functional!
@ -3,6 +3,10 @@
class Settings::ExportsController < Settings::BaseController
include Authorization
def show
@export = Export.new(current_account)
@backups = current_user.backups
@ -1,6 +1,12 @@
class Settings::FlavoursController < Settings::BaseController
def index
redirect_to action: 'show', flavour: current_flavour
class Settings::ImportsController < Settings::BaseController
before_action :set_account
@ -1,6 +1,10 @@
class Settings::MigrationsController < Settings::BaseController
@migration = Form::Migration.new(account: current_account.moved_to_account)
class Settings::PreferencesController < Settings::BaseController
def show; end
def update
@ -3,6 +3,9 @@
class Settings::ProfilesController < Settings::BaseController
include ObfuscateFilename
obfuscate_filename [:account, :avatar]
module Settings
module TwoFactorAuthentication
class ConfirmationsController < BaseController
before_action :ensure_otp_secret
class RecoveryCodesController < BaseController
def create
@ -2,6 +2,9 @@
class TwoFactorAuthenticationsController < BaseController
before_action :verify_otp_required, only: [:create]