forked from External/greenlight
GRN2-138: Fixed issue with admin rake task (#521)
* Fixed issue with admin rake task * rspec
This commit is contained in:
committed by
Jesus Federico
parent
4a4fcec6fb
commit
c3ddb17514
@ -78,8 +78,6 @@ module ApplicationHelper
|
||||
def allow_greenlight_accounts?
|
||||
return Rails.configuration.allow_user_signup unless Rails.configuration.loadbalanced_configuration
|
||||
return false unless @user_domain && !@user_domain.empty? && Rails.configuration.allow_user_signup
|
||||
# No need to retrieve the provider info if the provider is whitelisted
|
||||
return true if launcher_allow_user_signup_whitelisted?(@user_domain)
|
||||
# Proceed with retrieving the provider info
|
||||
begin
|
||||
provider_info = retrieve_provider_info(@user_domain, 'api2', 'getUserGreenlightCredentials')
|
||||
|
@ -200,9 +200,8 @@ class User < ApplicationRecord
|
||||
|
||||
def greenlight_account?
|
||||
return true unless provider # For testing cases when provider is set to null
|
||||
return provider == "greenlight" unless Rails.configuration.loadbalanced_configuration
|
||||
# No need to retrive the provider info if the provider is whitelisted
|
||||
return true if launcher_allow_user_signup_whitelisted?(provider)
|
||||
return true if provider == "greenlight"
|
||||
return false unless Rails.configuration.loadbalanced_configuration
|
||||
# Proceed with fetching the provider info
|
||||
provider_info = retrieve_provider_info(provider, 'api2', 'getUserGreenlightCredentials')
|
||||
provider_info['provider'] == 'greenlight'
|
||||
|
Reference in New Issue
Block a user