allow disabling of local logins. In the instance where an .edu is using cas they may not want a user to be able to log in once the users credentials have been revoked in the system that feeds the CAS authentication server. This is very optional
This commit is contained in:
parent
1575ce7b10
commit
0bdee973a0
|
@ -23,30 +23,34 @@
|
|||
<button class="btn btn-social persona" title="{{i18n login.persona.title}}" {{action "personaLogin" target="view"}}>{{i18n login.persona.title}}</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
<h3 style="text-align:center; margin-bottom:10px;">{{i18n login.or}}</h3>
|
||||
{{/if}}
|
||||
<form id='login-form'>
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label for='login-account-name'>{{i18n login.username}} </label>
|
||||
</td>
|
||||
<td>
|
||||
{{textField value=view.loginName placeholderKey="login.email_placeholder" id="login-account-name" autocorrect="off" autocapitalize="off" autofocus="autofocus"}}
|
||||
</td>
|
||||
<tr>
|
||||
<td>
|
||||
<label for='login-account-password'>{{i18n login.password}} </label>
|
||||
</td>
|
||||
<td>
|
||||
{{textField value=view.loginPassword type="password" id="login-account-password"}}
|
||||
<a id="forgot-password-link" {{action forgotPassword target="view"}}>{{i18n forgot_password.action}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
{{#if Discourse.SiteSettings.enable_local_logins}}
|
||||
{{#if view.hasAtLeastOneLoginButton}}
|
||||
<h3 style="text-align:center; margin-bottom:10px;">{{i18n login.or}}</h3>
|
||||
{{/if}}
|
||||
<form id='login-form'>
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label for='login-account-name'>{{i18n login.username}} </label>
|
||||
</td>
|
||||
<td>
|
||||
{{textField value=view.loginName placeholderKey="login.email_placeholder" id="login-account-name" autocorrect="off" autocapitalize="off" autofocus="autofocus"}}
|
||||
</td>
|
||||
<tr>
|
||||
<td>
|
||||
<label for='login-account-password'>{{i18n login.password}} </label>
|
||||
</td>
|
||||
<td>
|
||||
{{textField value=view.loginPassword type="password" id="login-account-password"}}
|
||||
<a id="forgot-password-link" {{action forgotPassword target="view"}}>{{i18n forgot_password.action}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
{{/if}}
|
||||
{{view.authMessage}}
|
||||
<div id='login-alert' {{bindAttr class="view.alertClass"}}>{{view.alert}}</div>
|
||||
</div>
|
||||
|
@ -54,7 +58,9 @@
|
|||
{{#if view.authenticate}}
|
||||
{{i18n login.authenticating}}
|
||||
{{/if}}
|
||||
{{#if Discourse.SiteSettings.enable_local_logins}}
|
||||
<button class='btn btn-large btn-primary' {{bindAttr disabled="view.loginDisabled"}} {{action login target="view"}}><i class="icon-unlock"></i> {{view.loginButtonText}}</button>
|
||||
|
||||
{{i18n create_account.invite}} <a id="new-account-link" {{action newAccount target="view"}}>{{i18n create_account.action}}</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
@ -129,6 +129,9 @@ class SiteSetting < ActiveRecord::Base
|
|||
|
||||
setting(:send_welcome_message, true)
|
||||
|
||||
client_setting(:enable_local_logins, true)
|
||||
client_setting(:enable_local_account_create, true)
|
||||
|
||||
client_setting(:enable_google_logins, true)
|
||||
client_setting(:enable_yahoo_logins, true)
|
||||
|
||||
|
|
|
@ -493,6 +493,8 @@ en:
|
|||
|
||||
# TODO: perhaps we need a way of protecting these settings for hosted solution, global settings ...
|
||||
|
||||
enable_local_logins: "Enable local authentication"
|
||||
enable_local_account_create: "Enable local account creation"
|
||||
enable_google_logins: "Enable Google authentication"
|
||||
enable_yahoo_logins: "Enable Yahoo authentication"
|
||||
|
||||
|
|
Loading…
Reference in New Issue