mirror of https://github.com/rancher/ui.git
Merge pull request #1789 from vincent99/master
Just Log In unless there's other kinds of auth
This commit is contained in:
commit
f8cd51a37e
|
|
@ -18,6 +18,7 @@ export default Component.extend({
|
||||||
shown: false,
|
shown: false,
|
||||||
provider: null,
|
provider: null,
|
||||||
readableProvider: null,
|
readableProvider: null,
|
||||||
|
onlyLocal: null,
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
showLocal() {
|
showLocal() {
|
||||||
|
|
@ -70,7 +71,7 @@ export default Component.extend({
|
||||||
set(this, 'rememberUsername', true);
|
set(this, 'rememberUsername', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get(this, 'provider')) {
|
if (get(this, 'provider') && !get(this,'onlyLocal')) {
|
||||||
let pv = null;
|
let pv = null;
|
||||||
switch(get(this, 'provider')) {
|
switch(get(this, 'provider')) {
|
||||||
case 'activedirectory':
|
case 'activedirectory':
|
||||||
|
|
@ -78,7 +79,7 @@ export default Component.extend({
|
||||||
break;
|
break;
|
||||||
case 'local':
|
case 'local':
|
||||||
default:
|
default:
|
||||||
pv = 'Local Auth';
|
pv = 'a Local User';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,10 @@
|
||||||
<button disabled={{waiting}} class="btn bg-primary" {{action "authenticate"}}>
|
<button disabled={{waiting}} class="btn bg-primary" {{action "authenticate"}}>
|
||||||
{{#if waiting}}
|
{{#if waiting}}
|
||||||
<i class="icon icon-spinner icon-spin"></i> {{t 'loginUserPass.loggingInLabel'}}
|
<i class="icon icon-spinner icon-spin"></i> {{t 'loginUserPass.loggingInLabel'}}
|
||||||
{{else}}
|
{{else if readableProvider}}
|
||||||
{{t 'loginUserPass.loginLabel' provider=readableProvider}}
|
{{t 'loginUserPass.loginLabel' provider=readableProvider}}
|
||||||
|
{{else}}
|
||||||
|
{{t 'loginUserPass.genericLoginLabel'}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@
|
||||||
action="authenticate"
|
action="authenticate"
|
||||||
waiting=waiting
|
waiting=waiting
|
||||||
shown=onlyLocal
|
shown=onlyLocal
|
||||||
|
onlyLocal=onlyLocal
|
||||||
provider="local"
|
provider="local"
|
||||||
}}
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -3881,6 +3881,7 @@ loginUserPass:
|
||||||
caasLabel: Email
|
caasLabel: Email
|
||||||
remember: Remember
|
remember: Remember
|
||||||
userPlaceholder: e.g. jsmith
|
userPlaceholder: e.g. jsmith
|
||||||
|
genericLoginLabel: Log In
|
||||||
loginLabel: Log In with {provider}
|
loginLabel: Log In with {provider}
|
||||||
loggingInLabel: Logging In...
|
loggingInLabel: Logging In...
|
||||||
passwordLabel: Password
|
passwordLabel: Password
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue