diff --git a/app/assets/javascripts/discourse/templates/modal/login.js.handlebars b/app/assets/javascripts/discourse/templates/modal/login.js.handlebars index b98ac1d9fb8..3546063dc95 100644 --- a/app/assets/javascripts/discourse/templates/modal/login.js.handlebars +++ b/app/assets/javascripts/discourse/templates/modal/login.js.handlebars @@ -16,8 +16,10 @@ {{#if Discourse.SiteSettings.enable_github_logins}} {{/if}} + {{#if Discourse.SiteSettings.enable_persona_logins}}
+ {{/if}}

{{i18n login.or}} diff --git a/app/models/site_setting.rb b/app/models/site_setting.rb index 8eee42695ce..1cd0067a31e 100644 --- a/app/models/site_setting.rb +++ b/app/models/site_setting.rb @@ -124,6 +124,8 @@ class SiteSetting < ActiveRecord::Base setting(:github_client_id, '') setting(:github_client_secret, '') + client_setting(:enable_persona_logins, true) + setting(:enforce_global_nicknames, true) setting(:discourse_org_access_key, '') setting(:enable_s3_uploads, false) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index a3fd6e0a99f..81fdd1c6c8a 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -58,7 +58,7 @@ <%= render :partial => "common/discourse_javascript" %> - <%= render :partial => "common/persona_javascript" %> + <%= render :partial => "common/persona_javascript" if SiteSetting.enable_persona_logins %> <%= render_google_analytics_code %> diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 9c24333242f..3fc39816fc8 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -339,6 +339,8 @@ en: github_client_id: "Client id for Github authentication, registered at https://github.com/settings/applications" github_client_secret: "Client secret for Github authentication, registered at https://github.com/settings/applications" + enable_persona_logins: "Enable email-based authentication with Mozilla Persona" + allow_import: "Allow import, which can replace ALL site data; leave false unless you plan to do data imports" active_user_rate_limit_secs: "How frequently we update the 'last_seen_at' field, in seconds"