Merge pull request #1789 from vincent99/master

Just Log In unless there's other kinds of auth
This commit is contained in:
Vincent Fiduccia 2018-04-02 22:45:55 -07:00 committed by GitHub
commit f8cd51a37e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 3 deletions

View File

@ -18,6 +18,7 @@ export default Component.extend({
shown: false,
provider: null,
readableProvider: null,
onlyLocal: null,
actions: {
showLocal() {
@ -70,7 +71,7 @@ export default Component.extend({
set(this, 'rememberUsername', true);
}
if (get(this, 'provider')) {
if (get(this, 'provider') && !get(this,'onlyLocal')) {
let pv = null;
switch(get(this, 'provider')) {
case 'activedirectory':
@ -78,7 +79,7 @@ export default Component.extend({
break;
case 'local':
default:
pv = 'Local Auth';
pv = 'a Local User';
break;
}

View File

@ -27,8 +27,10 @@
<button disabled={{waiting}} class="btn bg-primary" {{action "authenticate"}}>
{{#if waiting}}
<i class="icon icon-spinner icon-spin"></i> {{t 'loginUserPass.loggingInLabel'}}
{{else}}
{{else if readableProvider}}
{{t 'loginUserPass.loginLabel' provider=readableProvider}}
{{else}}
{{t 'loginUserPass.genericLoginLabel'}}
{{/if}}
</button>
</p>

View File

@ -40,6 +40,7 @@
action="authenticate"
waiting=waiting
shown=onlyLocal
onlyLocal=onlyLocal
provider="local"
}}
{{/if}}

View File

@ -3881,6 +3881,7 @@ loginUserPass:
caasLabel: Email
remember: Remember
userPlaceholder: e.g. jsmith
genericLoginLabel: Log In
loginLabel: Log In with {provider}
loggingInLabel: Logging In...
passwordLabel: Password