mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
Load plugin settings.
Along the lines for loading the locale files for a plugin we should also load the settings.yml for a plugin.
This commit is contained in:
@@ -15,6 +15,16 @@ class SiteSetting < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
|
||||
Dir["#{Rails.root}/plugins/*/config/settings.yml"].each do |plugin_settings|
|
||||
SiteSettings::YamlLoader.new(plugin_settings).load do |category, name, default, opts|
|
||||
if opts.delete(:client)
|
||||
client_setting(name, default, opts.merge(category: category))
|
||||
else
|
||||
setting(name, default, opts.merge(category: category))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.call_discourse_hub?
|
||||
self.enforce_global_nicknames? && self.discourse_org_access_key.present?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user