Show user's name upon successful login
parent
c2a0994aed
commit
ab4118fb29
1
NEWS
1
NEWS
|
@ -7,6 +7,7 @@ New features
|
||||||
Enhancements
|
Enhancements
|
||||||
- [web] don't allow a recurrence rule to end before the first occurrence
|
- [web] don't allow a recurrence rule to end before the first occurrence
|
||||||
- [web] updated Angular Material to version 1.1.0
|
- [web] updated Angular Material to version 1.1.0
|
||||||
|
- [web] show user's name upon successful login
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
- [eas] properly generate the BusyStatus for normal events
|
- [eas] properly generate the BusyStatus for normal events
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"Authenticating" = "Authenticating";
|
"Authenticating" = "Authenticating";
|
||||||
|
|
||||||
/* Appears when authentication succeeds */
|
/* Appears when authentication succeeds */
|
||||||
"Success" = "Success";
|
"Welcome" = "Welcome";
|
||||||
|
|
||||||
"Authentication Failed" = "Authentication Failed";
|
"Authentication Failed" = "Authentication Failed";
|
||||||
"Wrong username or password." = "Wrong username or password.";
|
"Wrong username or password." = "Wrong username or password.";
|
||||||
|
|
|
@ -126,7 +126,7 @@
|
||||||
ng-switch-when="logged">
|
ng-switch-when="logged">
|
||||||
<md-icon class="md-accent md-hue-1 sg-icon--large">done</md-icon>
|
<md-icon class="md-accent md-hue-1 sg-icon--large">done</md-icon>
|
||||||
<div class="md-default-theme md-accent md-hue-1 md-fg md-padding">
|
<div class="md-default-theme md-accent md-hue-1 md-fg md-padding">
|
||||||
<var:string label:value="Success"/>
|
<var:string label:value="Welcome"/> {{app.cn}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
//showPasswordDialog('expiration', createPasswordExpirationDialog, data['expire']);
|
//showPasswordDialog('expiration', createPasswordExpirationDialog, data['expire']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
d.resolve(redirectUrl(username, domain));
|
d.resolve({ cn: data.cn, url: redirectUrl(username, domain) });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -25,15 +25,16 @@
|
||||||
function login() {
|
function login() {
|
||||||
vm.loginState = 'authenticating';
|
vm.loginState = 'authenticating';
|
||||||
Authentication.login(vm.creds)
|
Authentication.login(vm.creds)
|
||||||
.then(function(url) {
|
.then(function(data) {
|
||||||
vm.loginState = 'logged';
|
vm.loginState = 'logged';
|
||||||
|
vm.cn = data.cn;
|
||||||
|
|
||||||
// Let the user see the succesfull message before reloading the page
|
// Let the user see the succesfull message before reloading the page
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
if (window.location.href === url)
|
if (window.location.href === data.url)
|
||||||
window.location.reload(true);
|
window.location.reload(true);
|
||||||
else
|
else
|
||||||
window.location.href = url;
|
window.location.href = data.url;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}, function(msg) {
|
}, function(msg) {
|
||||||
vm.loginState = 'error';
|
vm.loginState = 'error';
|
||||||
|
|
Loading…
Reference in New Issue