mirror of
https://github.com/discourse/discourse.git
synced 2024-12-20 02:33:55 +08:00
20 lines
386 B
Ruby
20 lines
386 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module SiteSettings
|
||
|
end
|
||
|
|
||
|
# A class to store and modify hidden site settings
|
||
|
class SiteSettings::HiddenProvider
|
||
|
def initialize
|
||
|
@hidden_settings = Set.new
|
||
|
end
|
||
|
|
||
|
def add_hidden(site_setting_name)
|
||
|
@hidden_settings << site_setting_name
|
||
|
end
|
||
|
|
||
|
def all
|
||
|
DiscoursePluginRegistry.apply_modifier(:hidden_site_settings, @hidden_settings)
|
||
|
end
|
||
|
end
|