2017-11-21 07:13:37 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Settings::BaseController < ApplicationController
|
2020-09-11 20:56:35 +02:00
|
|
|
layout 'admin'
|
|
|
|
|
|
|
|
before_action :authenticate_user!
|
2018-10-26 20:36:49 +02:00
|
|
|
before_action :set_body_classes
|
2019-12-30 04:38:30 +01:00
|
|
|
before_action :set_cache_headers
|
2017-11-21 07:13:37 +01:00
|
|
|
|
2019-07-23 10:30:24 +02:00
|
|
|
private
|
|
|
|
|
2018-10-26 20:36:49 +02:00
|
|
|
def set_body_classes
|
|
|
|
@body_classes = 'admin'
|
|
|
|
end
|
2019-12-30 04:38:30 +01:00
|
|
|
|
|
|
|
def set_cache_headers
|
2023-04-19 16:07:29 +02:00
|
|
|
response.cache_control.replace(private: true, no_store: true)
|
2019-12-30 04:38:30 +01:00
|
|
|
end
|
2020-09-11 20:56:35 +02:00
|
|
|
|
|
|
|
def require_not_suspended!
|
2023-11-30 16:43:26 +01:00
|
|
|
forbidden if current_account.unavailable?
|
2020-09-11 20:56:35 +02:00
|
|
|
end
|
2017-11-21 07:13:37 +01:00
|
|
|
end
|