diff --git a/dmp-frontend/src/app/ui/description/overview/description-overview.component.ts b/dmp-frontend/src/app/ui/description/overview/description-overview.component.ts index 28d69897a..0b3d6bf2d 100644 --- a/dmp-frontend/src/app/ui/description/overview/description-overview.component.ts +++ b/dmp-frontend/src/app/ui/description/overview/description-overview.component.ts @@ -241,9 +241,9 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni isUserAuthor(userId: Guid): boolean { - if (this.isAuthenticated() && this.userName) { + if (this.isAuthenticated()) { const principalId: Guid = this.authentication.userId(); - return userId === principalId; + return this.userName && (userId === principalId); } else return false; } diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts index 9fb68d126..645308910 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts @@ -233,9 +233,9 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { } isUserAuthor(userId: Guid): boolean { - if (this.isAuthenticated() && this.userName) { + if (this.isAuthenticated()) { const principalId: Guid = this.authentication.userId(); - return userId === principalId; + return this.userName && userId === principalId; } else return false; }