2018-12-12 13:32:13 -08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Settings::BaseController < ApplicationController
|
2020-09-11 11:56:35 -07:00
|
|
|
layout 'admin'
|
|
|
|
|
|
|
|
before_action :authenticate_user!
|
2018-12-12 13:32:13 -08:00
|
|
|
before_action :set_body_classes
|
2019-12-29 19:38:30 -08:00
|
|
|
before_action :set_cache_headers
|
2018-12-12 13:32:13 -08:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def set_body_classes
|
|
|
|
@body_classes = 'admin'
|
|
|
|
end
|
2019-12-29 19:38:30 -08:00
|
|
|
|
|
|
|
def set_cache_headers
|
2023-04-19 07:07:29 -07:00
|
|
|
response.cache_control.replace(private: true, no_store: true)
|
2019-12-29 19:38:30 -08:00
|
|
|
end
|
2020-09-11 11:56:35 -07:00
|
|
|
|
|
|
|
def require_not_suspended!
|
2023-11-30 07:43:26 -08:00
|
|
|
forbidden if current_account.unavailable?
|
2020-09-11 11:56:35 -07:00
|
|
|
end
|
2018-12-12 13:32:13 -08:00
|
|
|
end
|