zammad/app/models/system_report/plugin/setting.rb
2026-01-02 15:41:09 +02:00

19 lines
705 B
Ruby

# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
class SystemReport::Plugin::Setting < SystemReport::Plugin
SENSITIVE_SETTING_NAMES = %w[secret auth_ password pw credential endpoint_key _config _token recovery_codes pwd].freeze
DESCRIPTION = __('Current state of configured settings (excluding passwords and tokens)').freeze
def fetch
::Setting.all.each_with_object([]) do |setting, result|
next if SENSITIVE_SETTING_NAMES.any? { |word| setting.name.include?(word) }
result << {
name: setting.name,
current_value: setting.state_current['value'],
initial_value: setting.state_initial['value'],
}
end
end
end