2017-11-21 01:13:37 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Settings::BaseController < ApplicationController
|
|
|
|
before_action :set_pack
|
2020-09-11 14:56:35 -04:00
|
|
|
layout 'admin'
|
|
|
|
|
|
|
|
before_action :authenticate_user!
|
2018-10-26 14:36:49 -04:00
|
|
|
before_action :set_body_classes
|
2019-12-29 22:38:30 -05:00
|
|
|
before_action :set_cache_headers
|
2017-11-21 01:13:37 -05:00
|
|
|
|
2019-07-23 04:30:24 -04:00
|
|
|
private
|
|
|
|
|
2017-11-21 01:13:37 -05:00
|
|
|
def set_pack
|
|
|
|
use_pack 'settings'
|
|
|
|
end
|
2018-10-26 14:36:49 -04:00
|
|
|
|
|
|
|
def set_body_classes
|
|
|
|
@body_classes = 'admin'
|
|
|
|
end
|
2019-12-29 22:38:30 -05:00
|
|
|
|
|
|
|
def set_cache_headers
|
2023-04-19 10:07:29 -04:00
|
|
|
response.cache_control.replace(private: true, no_store: true)
|
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
|
2017-11-21 01:13:37 -05:00
|
|
|
end
|