Make Persona configurable

This commit is contained in:
Dan Callahan 2013-03-01 13:51:00 -06:00
parent 23d812a4ab
commit 7c87359e02
4 changed files with 7 additions and 1 deletions

View File

@ -16,8 +16,10 @@
{{#if Discourse.SiteSettings.enable_github_logins}} {{#if Discourse.SiteSettings.enable_github_logins}}
<button class="btn btn-social github" title="{{i18n login.github.title}}" {{action "githubLogin" target="view"}}>{{i18n login.github.title}}</button> <button class="btn btn-social github" title="{{i18n login.github.title}}" {{action "githubLogin" target="view"}}>{{i18n login.github.title}}</button>
{{/if}} {{/if}}
{{#if Discourse.SiteSettings.enable_persona_logins}}
<br> <br>
<button class="btn btn-social persona" title="{{i18n login.persona.title}}" {{action "personaLogin" target="view"}}>{{i18n login.persona.title}}</button> <button class="btn btn-social persona" title="{{i18n login.persona.title}}" {{action "personaLogin" target="view"}}>{{i18n login.persona.title}}</button>
{{/if}}
</div> </div>
<h3 style="text-align:center; margin-bottom:10px;"> <h3 style="text-align:center; margin-bottom:10px;">
{{i18n login.or}} {{i18n login.or}}

View File

@ -124,6 +124,8 @@ class SiteSetting < ActiveRecord::Base
setting(:github_client_id, '') setting(:github_client_id, '')
setting(:github_client_secret, '') setting(:github_client_secret, '')
client_setting(:enable_persona_logins, true)
setting(:enforce_global_nicknames, true) setting(:enforce_global_nicknames, true)
setting(:discourse_org_access_key, '') setting(:discourse_org_access_key, '')
setting(:enable_s3_uploads, false) setting(:enable_s3_uploads, false)

View File

@ -58,7 +58,7 @@
<footer id='bottom'></footer> <footer id='bottom'></footer>
<%= render :partial => "common/discourse_javascript" %> <%= render :partial => "common/discourse_javascript" %>
<%= render :partial => "common/persona_javascript" %> <%= render :partial => "common/persona_javascript" if SiteSetting.enable_persona_logins %>
<%= render_google_analytics_code %> <%= render_google_analytics_code %>
<!-- Discourse Version: <%= Discourse::VERSION::STRING %> --> <!-- Discourse Version: <%= Discourse::VERSION::STRING %> -->

View File

@ -339,6 +339,8 @@ en:
github_client_id: "Client id for Github authentication, registered at https://github.com/settings/applications" 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" 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" 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" active_user_rate_limit_secs: "How frequently we update the 'last_seen_at' field, in seconds"