X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fservices%2FAuthGuardService.ts;h=05d3a1e206b268176bf546189844daca0189ac5f;hb=52474e7709f325bc4b6250190a20e98f7602fabf;hp=512705fa2dde000386a8f47117c0c9ceb86a61f6;hpb=0a34dfa32165036b380ec6ac493469b34007df0a;p=osm%2FNG-UI.git diff --git a/src/services/AuthGuardService.ts b/src/services/AuthGuardService.ts index 512705f..05d3a1e 100644 --- a/src/services/AuthGuardService.ts +++ b/src/services/AuthGuardService.ts @@ -30,6 +30,7 @@ import { map } from 'rxjs/operators'; * @Injectable takes a metadata object that tells Angular how to compile and run module code */ @Injectable() +// eslint-disable-next-line deprecation/deprecation export class AuthGuardService implements CanActivate { /** Holds teh instance of AuthService class of type AuthService @private */ private router: Router; @@ -48,10 +49,11 @@ export class AuthGuardService implements CanActivate { // eslint-disable-next-line deprecation/deprecation return combineLatest( this.authService.isLoggedIn, - this.authService.isChangePassword + this.authService.isChangePassword, + this.authService.isForgotPassword ).pipe( - map(([isLoggedIn, changePassword]: [boolean, boolean]): boolean => { - if (changePassword || isLoggedIn) { + map(([isLoggedIn, changePassword, forgotPassword]: [boolean, boolean, boolean]): boolean => { + if (changePassword || isLoggedIn || forgotPassword) { return true; } else { this.router.navigate(['/login']).catch((): void => {