From b5f20c0a464a4e52bf66c145621669ebcaaf11a7 Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Wed, 14 Oct 2020 13:34:01 -0400 Subject: [PATCH] Make allow email password login default true (#10838) * Make allow email password login default true * Change test --- app/lib/constants/site_config.rb | 2 +- app/models/site_config.rb | 2 +- spec/requests/registrations_spec.rb | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/lib/constants/site_config.rb b/app/lib/constants/site_config.rb index 29cdc4d09..d711a42fe 100644 --- a/app/lib/constants/site_config.rb +++ b/app/lib/constants/site_config.rb @@ -6,7 +6,7 @@ module Constants placeholder: "" }, allow_email_password_login: { - description: "Can users login with only email and password?", + description: "Can users login using email and password?", placeholder: "" }, authentication_providers: { diff --git a/app/models/site_config.rb b/app/models/site_config.rb index 1b6efaf9e..797180054 100644 --- a/app/models/site_config.rb +++ b/app/models/site_config.rb @@ -23,7 +23,7 @@ class SiteConfig < RailsSettings::Base # Authentication field :allow_email_password_registration, type: :boolean, default: false - field :allow_email_password_login, type: :boolean, default: false + field :allow_email_password_login, type: :boolean, default: true field :authentication_providers, type: :array, default: proc { Authentication::Providers.available } field :invite_only_mode, type: :boolean, default: false field :twitter_key, type: :string, default: ApplicationConfig["TWITTER_KEY"] diff --git a/spec/requests/registrations_spec.rb b/spec/requests/registrations_spec.rb index 7a7026712..e854c7dbf 100644 --- a/spec/requests/registrations_spec.rb +++ b/spec/requests/registrations_spec.rb @@ -17,6 +17,7 @@ RSpec.describe "Registrations", type: :request do it "only shows the single sign on options if they are present" do allow(Authentication::Providers).to receive(:enabled).and_return([]) + allow(SiteConfig).to receive(:allow_email_password_login).and_return(false) get sign_up_path