forked from External/greenlight
Fix office365 if hd environment variable isn't set (#629)
This commit is contained in:
parent
eb82425747
commit
85da83f8b0
|
@ -33,7 +33,7 @@ module ApplicationHelper
|
|||
|
||||
# Determines which providers can show a login button in the login modal.
|
||||
def iconset_providers
|
||||
providers = configured_providers & [:google, :twitter, :microsoft_office365, :ldap]
|
||||
providers = configured_providers & [:google, :twitter, :office365, :ldap]
|
||||
|
||||
providers.delete(:twitter) if session[:old_twitter_user_id]
|
||||
|
||||
|
|
|
@ -99,14 +99,16 @@ module SessionsHelper
|
|||
end
|
||||
|
||||
def set_hd(env, hd)
|
||||
hd_opts = hd.split(',')
|
||||
env['omniauth.strategy'].options[:hd] =
|
||||
if hd_opts.empty?
|
||||
nil
|
||||
elsif hd_opts.length == 1
|
||||
hd_opts[0]
|
||||
else
|
||||
hd_opts
|
||||
if hd
|
||||
hd_opts = hd.split(',')
|
||||
env['omniauth.strategy'].options[:hd] =
|
||||
if hd_opts.empty?
|
||||
nil
|
||||
elsif hd_opts.length == 1
|
||||
hd_opts[0]
|
||||
else
|
||||
hd_opts
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue