diff --git a/projects/aca-content/src/lib/store/effects/app.effects.ts b/projects/aca-content/src/lib/store/effects/app.effects.ts index 47dceae05e..f057e80700 100644 --- a/projects/aca-content/src/lib/store/effects/app.effects.ts +++ b/projects/aca-content/src/lib/store/effects/app.effects.ts @@ -25,14 +25,12 @@ import { Actions, ofType, createEffect } from '@ngrx/effects'; import { Injectable } from '@angular/core'; import { map } from 'rxjs/operators'; -import { AppActionTypes, LogoutAction, ReloadDocumentListAction, ResetSelectionAction } from '@alfresco/aca-shared/store'; -import { AuthenticationService } from '@alfresco/adf-core'; -import { Router } from '@angular/router'; +import { AppActionTypes, ReloadDocumentListAction, ResetSelectionAction } from '@alfresco/aca-shared/store'; import { AppHookService } from '@alfresco/aca-shared'; @Injectable() export class AppEffects { - constructor(private actions$: Actions, private auth: AuthenticationService, private router: Router, private appHookService: AppHookService) {} + constructor(private actions$: Actions, private appHookService: AppHookService) {} reload = createEffect( () => @@ -55,22 +53,4 @@ export class AppEffects { ), { dispatch: false } ); - - logout$ = createEffect( - () => - this.actions$.pipe( - ofType(AppActionTypes.Logout), - map(() => { - this.auth.logout().subscribe( - () => this.redirectToLogin(), - () => this.redirectToLogin() - ); - }) - ), - { dispatch: false } - ); - - private redirectToLogin(): Promise { - return this.router.navigate(['login']); - } } diff --git a/projects/aca-shared/store/src/actions/app-action-types.ts b/projects/aca-shared/store/src/actions/app-action-types.ts index 6aef4a830b..7a892e1764 100644 --- a/projects/aca-shared/store/src/actions/app-action-types.ts +++ b/projects/aca-shared/store/src/actions/app-action-types.ts @@ -29,12 +29,10 @@ export enum AppActionTypes { SetUserProfile = 'SET_USER_PROFILE', SetRepositoryInfo = 'SET_REPOSITORY_INFO', ToggleInfoDrawer = 'TOGGLE_INFO_DRAWER', - Logout = 'LOGOUT', ReloadDocumentList = 'RELOAD_DOCUMENT_LIST', ResetSelection = 'RESET_SELECTION', SetInfoDrawerState = 'SET_INFO_DRAWER_STATE', SetInfoDrawerMetadataAspect = 'SET_INFO_DRAWER_METADATA_ASPECT', - CloseModalDialogs = 'CLOSE_MODAL_DIALOGS', SetFileUploadingDialog = 'SET_FILE_UPLOADING_DIALOG', ShowInfoDrawerPreview = 'SHOW_INFO_DRAWER_PREVIEW', SetInfoDrawerPreviewState = 'SET_INFO_DRAWER_PREVIEW_STATE', diff --git a/projects/aca-shared/store/src/actions/app.actions.ts b/projects/aca-shared/store/src/actions/app.actions.ts index 7a2c73f5e1..28f7918426 100644 --- a/projects/aca-shared/store/src/actions/app.actions.ts +++ b/projects/aca-shared/store/src/actions/app.actions.ts @@ -55,10 +55,6 @@ export class ToggleInfoDrawerAction implements Action { readonly type = AppActionTypes.ToggleInfoDrawer; } -export class LogoutAction implements Action { - readonly type = AppActionTypes.Logout; -} - export class ReloadDocumentListAction implements Action { readonly type = AppActionTypes.ReloadDocumentList;