forked from External/greenlight
Fixed 500 caused by 1 provider (#937)
This commit is contained in:
parent
079d64795b
commit
984e5cc085
@ -30,11 +30,13 @@ class SessionsController < ApplicationController
|
|||||||
def signin
|
def signin
|
||||||
check_if_twitter_account
|
check_if_twitter_account
|
||||||
|
|
||||||
|
@providers = configured_providers
|
||||||
|
|
||||||
if one_provider
|
if one_provider
|
||||||
provider_path = if Rails.configuration.omniauth_ldap
|
provider_path = if Rails.configuration.omniauth_ldap
|
||||||
ldap_signin_path
|
ldap_signin_path
|
||||||
else
|
else
|
||||||
"#{Rails.configuration.relative_url_root}/auth/#{providers.first}"
|
"#{Rails.configuration.relative_url_root}/auth/#{@providers.first}"
|
||||||
end
|
end
|
||||||
|
|
||||||
return redirect_to provider_path
|
return redirect_to provider_path
|
||||||
@ -156,9 +158,7 @@ class SessionsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def one_provider
|
def one_provider
|
||||||
providers = configured_providers
|
(!allow_user_signup? || !allow_greenlight_accounts?) && @providers.count == 1 &&
|
||||||
|
|
||||||
(!allow_user_signup? || !allow_greenlight_accounts?) && providers.count == 1 &&
|
|
||||||
!Rails.configuration.loadbalanced_configuration
|
!Rails.configuration.loadbalanced_configuration
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user