auto login of settings is modified

This commit is contained in:
병준 박 2019-12-17 16:29:04 +09:00
parent 99ff3eaa36
commit b5ceea129b
4 changed files with 9 additions and 6 deletions

View File

@ -46,7 +46,11 @@ export class AppAutoLoginGuard implements CanActivate {
'PERSON_LOGOUT'
);
if (!!appUserInfo && appUserInfo.autoLogin && !personLogout) {
if (
!!appUserInfo &&
appUserInfo.settings.general.autoLogin &&
!personLogout
) {
this.store.dispatch(
AuthenticationStore.webLogin({
loginInfo: {
@ -56,7 +60,7 @@ export class AppAutoLoginGuard implements CanActivate {
loginPw: appUserInfo.loginPw
},
rememberMe: appUserInfo.rememberMe,
autoLogin: appUserInfo.autoLogin
autoLogin: true
})
);
resolve(false);

View File

@ -9,7 +9,7 @@
[companyCode]="appUserInfo?.companyCode"
[loginId]="appUserInfo?.loginId"
[rememberMe]="appUserInfo?.rememberMe"
[autoLogin]="appUserInfo?.autoLogin"
[autoLogin]="appUserInfo?.settings?.general?.autoLogin"
[useRememberMe]="useRememberMe"
[useAutoLogin]="useAutoLogin"
(login)="onLogin($event)"

View File

@ -74,9 +74,9 @@ export class AppAuthenticationService {
if (rememberMe || autoLogin) {
appUserInfo = {
...appUserInfo,
rememberMe,
autoLogin
rememberMe
};
appUserInfo.settings.general.autoLogin = autoLogin;
}
this.localStorageService.encSet<AppUserInfo>(

View File

@ -7,7 +7,6 @@ export interface AppUserInfo {
loginId?: string;
loginPw?: string;
rememberMe?: boolean;
autoLogin?: boolean;
companyCode?: string;
companyGroupType?: string;
localeCode?: LocaleCode;