auto login of settings is modified
This commit is contained in:
parent
99ff3eaa36
commit
b5ceea129b
|
@ -46,7 +46,11 @@ export class AppAutoLoginGuard implements CanActivate {
|
||||||
'PERSON_LOGOUT'
|
'PERSON_LOGOUT'
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!!appUserInfo && appUserInfo.autoLogin && !personLogout) {
|
if (
|
||||||
|
!!appUserInfo &&
|
||||||
|
appUserInfo.settings.general.autoLogin &&
|
||||||
|
!personLogout
|
||||||
|
) {
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
AuthenticationStore.webLogin({
|
AuthenticationStore.webLogin({
|
||||||
loginInfo: {
|
loginInfo: {
|
||||||
|
@ -56,7 +60,7 @@ export class AppAutoLoginGuard implements CanActivate {
|
||||||
loginPw: appUserInfo.loginPw
|
loginPw: appUserInfo.loginPw
|
||||||
},
|
},
|
||||||
rememberMe: appUserInfo.rememberMe,
|
rememberMe: appUserInfo.rememberMe,
|
||||||
autoLogin: appUserInfo.autoLogin
|
autoLogin: true
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
resolve(false);
|
resolve(false);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
[companyCode]="appUserInfo?.companyCode"
|
[companyCode]="appUserInfo?.companyCode"
|
||||||
[loginId]="appUserInfo?.loginId"
|
[loginId]="appUserInfo?.loginId"
|
||||||
[rememberMe]="appUserInfo?.rememberMe"
|
[rememberMe]="appUserInfo?.rememberMe"
|
||||||
[autoLogin]="appUserInfo?.autoLogin"
|
[autoLogin]="appUserInfo?.settings?.general?.autoLogin"
|
||||||
[useRememberMe]="useRememberMe"
|
[useRememberMe]="useRememberMe"
|
||||||
[useAutoLogin]="useAutoLogin"
|
[useAutoLogin]="useAutoLogin"
|
||||||
(login)="onLogin($event)"
|
(login)="onLogin($event)"
|
||||||
|
|
|
@ -74,9 +74,9 @@ export class AppAuthenticationService {
|
||||||
if (rememberMe || autoLogin) {
|
if (rememberMe || autoLogin) {
|
||||||
appUserInfo = {
|
appUserInfo = {
|
||||||
...appUserInfo,
|
...appUserInfo,
|
||||||
rememberMe,
|
rememberMe
|
||||||
autoLogin
|
|
||||||
};
|
};
|
||||||
|
appUserInfo.settings.general.autoLogin = autoLogin;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.localStorageService.encSet<AppUserInfo>(
|
this.localStorageService.encSet<AppUserInfo>(
|
||||||
|
|
|
@ -7,7 +7,6 @@ export interface AppUserInfo {
|
||||||
loginId?: string;
|
loginId?: string;
|
||||||
loginPw?: string;
|
loginPw?: string;
|
||||||
rememberMe?: boolean;
|
rememberMe?: boolean;
|
||||||
autoLogin?: boolean;
|
|
||||||
companyCode?: string;
|
companyCode?: string;
|
||||||
companyGroupType?: string;
|
companyGroupType?: string;
|
||||||
localeCode?: LocaleCode;
|
localeCode?: LocaleCode;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user