Skip to content
Snippets Groups Projects
Commit f42577cb authored by David Taylor's avatar David Taylor
Browse files

UX: If configured via environment variables, hide the site settings

parent e9f9150b
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,15 @@ module ::DiscourseSaml
end
after_initialize do
if !!GlobalSetting.try("#{name}_target_url")
# Configured via environment variables. Hide all the site settings
# from the UI to avoid confusion
SiteSetting.defaults.all.keys.each do |k|
next if !k.to_s.start_with?("saml_")
SiteSetting.hidden_settings << k
end
end
# "SAML Forced Domains" - Prevent login via email
on(:before_email_login) do |user|
if ::DiscourseSaml.is_saml_forced_domain?(user.email)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment