Skip to content

Commit

Permalink
Fix office365 if hd environment variable isn't set (bigbluebutton#629)
Browse files Browse the repository at this point in the history
  • Loading branch information
shawn-higgins1 authored and jfederico committed Jul 11, 2019
1 parent eb82425 commit 85da83f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def configured_providers

# 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]

Expand Down
18 changes: 10 additions & 8 deletions app/helpers/sessions_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,16 @@ def omniauth_options(env)
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

Expand Down

0 comments on commit 85da83f

Please sign in to comment.