mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 22:27:49 +08:00
FEATURE: allow multiple secrets for Discourse SSO provider
This splits off the logic between SSO keys used incoming vs outgoing, it allows to far better restrict who is allowed to log in using a site. This allows for better auditing of the SSO provider feature
This commit is contained in:
@ -220,7 +220,8 @@ module SiteSettingExtension
|
||||
value: value.to_s,
|
||||
category: categories[s],
|
||||
preview: previews[s],
|
||||
secret: secret_settings.include?(s)
|
||||
secret: secret_settings.include?(s),
|
||||
placeholder: placeholder(s)
|
||||
}.merge(type_supervisor.type_hash(s))
|
||||
|
||||
opts
|
||||
@ -231,6 +232,12 @@ module SiteSettingExtension
|
||||
I18n.t("site_settings.#{setting}")
|
||||
end
|
||||
|
||||
def placeholder(setting)
|
||||
if !I18n.t("site_settings.placeholder.#{setting}", default: "").empty?
|
||||
I18n.t("site_settings.placeholder.#{setting}")
|
||||
end
|
||||
end
|
||||
|
||||
def self.client_settings_cache_key
|
||||
# NOTE: we use the git version in the key to ensure
|
||||
# that we don't end up caching the incorrect version
|
||||
|
Reference in New Issue
Block a user