From cbced6f859724227f2113a019cd7edf365b5b48f Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Mon, 10 May 2021 15:45:09 +0100 Subject: [PATCH] Add profile to user interface --- src/app/models/user.model.ts | 4 +--- src/app/services/auth.service.ts | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/models/user.model.ts b/src/app/models/user.model.ts index c62516027..33de6f0f7 100644 --- a/src/app/models/user.model.ts +++ b/src/app/models/user.model.ts @@ -7,9 +7,6 @@ export class UserForm { export class User { - username: string; - password: string; - domainName: string; BasicAuthKey: string; UserId?: number; Authorization: string; @@ -28,4 +25,5 @@ export class User { Id: 1 }[] UserName: string + Profile: "PR" | "MDGPR" } \ No newline at end of file diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts index 8170105b0..b1c134083 100644 --- a/src/app/services/auth.service.ts +++ b/src/app/services/auth.service.ts @@ -54,6 +54,12 @@ export class AuthService { console.log(response) if (result) { + + if( response.RoleID == 100000014){ + response.Profile = 'PR' + } else if(response.RoleID == 100000011) { + response.Profile = 'MDGPR' + } response.BasicAuthKey = user.BasicAuthKey this.ValidatedUser = response;