2018-12-12 16:32:13 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Settings::BaseController < ApplicationController
|
2020-09-11 14:56:35 -04:00
|
|
|
layout 'admin'
|
|
|
|
|
|
|
|
before_action :authenticate_user!
|
2018-12-12 16:32:13 -05:00
|
|
|
before_action :set_body_classes
|
2019-12-29 22:38:30 -05:00
|
|
|
before_action :set_cache_headers
|
2018-12-12 16:32:13 -05:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def set_body_classes
|
|
|
|
@body_classes = 'admin'
|
|
|
|
end
|
2019-12-29 22:38:30 -05:00
|
|
|
|
|
|
|
def set_cache_headers
|
2022-11-15 22:56:30 -05:00
|
|
|
response.headers['Cache-Control'] = 'private, no-store'
|
2019-12-29 22:38:30 -05:00
|
|
|
end
|
2020-09-11 14:56:35 -04:00
|
|
|
|
|
|
|
def require_not_suspended!
|
|
|
|
forbidden if current_account.suspended?
|
|
|
|
end
|
2018-12-12 16:32:13 -05:00
|
|
|
end
|