You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
482 B

  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'] = 'no-cache, no-store, max-age=0, must-revalidate'
  13. end
  14. def require_not_suspended!
  15. forbidden if current_account.suspended?
  16. end
  17. end