Commit e006355b authored by Labros Papadopoulos's avatar Labros Papadopoulos
Browse files

add validation for null portalUserJwt value

parent 5f6fdafb
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -18,11 +18,12 @@ export class RedirectComponent implements OnInit {

  ngOnInit() {
    let isTestbedProvider = false;
    if(this.authService != null && this.authService.portalUserJWT !=null) {
    for(var val of this.authService.portalUserJWT.realm_access.roles){
      if (val ==='TESTBED_PROVIDER') {
        isTestbedProvider=true
        }
    }
    }}
    //TODO insert redirection logic
    const activePortal = localStorage.getItem('active_portal')