X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=portal-FE-common%2Fsrc%2Fapp%2Flayout%2Fcomponents%2Fheader%2Fheader.component.ts;h=429587d9b4eb3f19e78e221a42b7aacb355fa71e;hb=40b292ad1ff5a2ba00fcde8f023058cfb52c2d4e;hp=09dd4c1a1f227227ceac54ebb5d9a8f8ce28dc39;hpb=83d7869034c0a3e3727c30f85cdc89acb8d60218;p=portal.git diff --git a/portal-FE-common/src/app/layout/components/header/header.component.ts b/portal-FE-common/src/app/layout/components/header/header.component.ts index 09dd4c1a..429587d9 100644 --- a/portal-FE-common/src/app/layout/components/header/header.component.ts +++ b/portal-FE-common/src/app/layout/components/header/header.component.ts @@ -59,6 +59,7 @@ export class HeaderComponent implements OnInit { api = environment.api; brandName: string; brandLogoImagePath: string; + isSystemUser: boolean = false; constructor(public router: Router, private userProfileService: UserProfileService, private menusService: MenusService, private cookieService: CookieService) { @@ -90,7 +91,7 @@ export class HeaderComponent implements OnInit { getUserInformation() { this.userProfileService.getFunctionalMenuStaticInfo().toPromise().then((res: any) => { - if (res == null || res.firstName == null || res.firstName == '' || res.lastName == null || res.lastName == '') { + if (res === null || res.firstName === null || res.firstName === '' || res.lastName === null || res.lastName === '') { // $log.info('HeaderCtrl: failed to get all required data, trying user profile'); this.userProfileService.getUserProfile().toPromise().then((profile: any) => { this.firstName = profile.firstName; @@ -105,6 +106,9 @@ export class HeaderComponent implements OnInit { this.loginSnippetUserid = res.userId; this.lastLogin = Date.parse(res.last_login); } + if(res != null && res.isSystemUser === 'true'){ + this.isSystemUser = true; + } sessionStorage.userId = res.userId; this.menusService.getFunctionalMenuForUser().toPromise().then((jsonHeaderMenu: any) => { // $scope.menuItems = unflatten(jsonHeaderMenu);