mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-22 05:08:03 +00:00
1901829f9a
Conflicts: - `config/initializers/content_security_policy.rb`: Our config file is pretty different from upstream. Upstream changed CSP directive `script-src` to include `wasm-unsafe-eval` instead of `unsafe-eval`, which we did not include. Added `wasm-unsafe-eval` to `script-src` to fix execution of the OCR web worker. - `package.json`: Upstream updated a dependency (`array-includes`) textually adjacent to a glitch-soc-only dependency (`atrament`). Updated `array-includes` as upstream did.
29 lines
525 B
Ruby
29 lines
525 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Settings::BaseController < ApplicationController
|
|
before_action :set_pack
|
|
layout 'admin'
|
|
|
|
before_action :authenticate_user!
|
|
before_action :set_body_classes
|
|
before_action :set_cache_headers
|
|
|
|
private
|
|
|
|
def set_pack
|
|
use_pack 'settings'
|
|
end
|
|
|
|
def set_body_classes
|
|
@body_classes = 'admin'
|
|
end
|
|
|
|
def set_cache_headers
|
|
response.headers['Cache-Control'] = 'private, no-store'
|
|
end
|
|
|
|
def require_not_suspended!
|
|
forbidden if current_account.suspended?
|
|
end
|
|
end
|