base_controller.rb 369 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. class Settings::BaseController < ApplicationController
  3. layout 'admin'
  4. before_action :authenticate_user!
  5. before_action :set_cache_headers
  6. private
  7. def set_cache_headers
  8. response.cache_control.replace(private: true, no_store: true)
  9. end
  10. def require_not_suspended!
  11. forbidden if current_account.unavailable?
  12. end
  13. end