base_controller.rb 453 B

1234567891011121314151617181920212223
  1. # frozen_string_literal: true
  2. class Settings::BaseController < ApplicationController
  3. layout 'admin'
  4. before_action :authenticate_user!
  5. before_action :set_body_classes
  6. before_action :set_cache_headers
  7. private
  8. def set_body_classes
  9. @body_classes = 'admin'
  10. end
  11. def set_cache_headers
  12. response.headers['Cache-Control'] = 'private, no-store'
  13. end
  14. def require_not_suspended!
  15. forbidden if current_account.suspended?
  16. end
  17. end