GRN2-xx: Added back fix for ldap image and fixed issue with ldap redirect (Fixed #712) (#711)

* Added back fix for ldap image

* Fixed issue with ldap redirect
This commit is contained in:
farhatahmad
2019-07-31 11:35:43 -04:00
committed by Jesus Federico
parent 973c95339c
commit e0afcdec23
2 changed files with 8 additions and 2 deletions

View File

@ -71,7 +71,13 @@ class UsersController < ApplicationController
providers = configured_providers
if (!allow_user_signup? || !allow_greenlight_accounts?) && providers.count == 1 &&
!Rails.configuration.loadbalanced_configuration
return redirect_to "#{Rails.configuration.relative_url_root}/auth/#{providers.first}"
provider_path = if Rails.configuration.omniauth_ldap
ldap_signin_path
else
"#{Rails.configuration.relative_url_root}/auth/#{providers.first}"
end
return redirect_to provider_path
end
end