From 093837c3950e6e0e5878c19be31b5420a3526754 Mon Sep 17 00:00:00 2001 From: George Kalampokis Date: Wed, 18 Oct 2023 18:13:32 +0300 Subject: [PATCH] Fix DMP user ownership error --- dmp-frontend/src/app/core/model/auth/principal.ts | 1 + dmp-frontend/src/app/core/services/auth/auth.service.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dmp-frontend/src/app/core/model/auth/principal.ts b/dmp-frontend/src/app/core/model/auth/principal.ts index c0012e7cd..27609c091 100644 --- a/dmp-frontend/src/app/core/model/auth/principal.ts +++ b/dmp-frontend/src/app/core/model/auth/principal.ts @@ -19,6 +19,7 @@ export interface AppPrincipalInfo{ notBefore: Date; authenticatedAt: Date; expiresAt: Date; + userId: Guid; more: Record } export interface UserProfileInfo { diff --git a/dmp-frontend/src/app/core/services/auth/auth.service.ts b/dmp-frontend/src/app/core/services/auth/auth.service.ts index 66238f10a..a69d35d4d 100644 --- a/dmp-frontend/src/app/core/services/auth/auth.service.ts +++ b/dmp-frontend/src/app/core/services/auth/auth.service.ts @@ -125,9 +125,9 @@ export class AuthService extends BaseService { if ( this.appAccount && this.appAccount.principal && - this.appAccount.principal.subject + this.appAccount.principal.userId ) { - return this.appAccount.principal.subject; + return this.appAccount.principal.userId; } return null; }