Project

General

Profile

« Previous | Next » 

Revision 61435

removed openAIREUser cookie usage

View differences:

auth-guard.service.ts
10 10
  constructor (private authenticationService: AuthenticationService, private router: Router) {}
11 11

  
12 12
  canActivate (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
13
    if ( this.authenticationService.getIsUserLoggedIn() ) { return true; }
13 14

  
14
    if ( (getCookie('openAIREUser') !== null) &&
15
         (getCookie('openAIREUser') !== '') &&
16
         this.authenticationService.getIsUserLoggedIn() ) { return true; }
17

  
18
    if ( (getCookie('openAIREUser') !== null) && (getCookie('openAIREUser') !== '') ) { return true; }
19

  
20 15
    /* If no cookie was found, clear the app's session.
21 16
       The user may have logged out using another OpenAIRE portal */
22 17
    sessionStorage.clear();

Also available in: Unified diff