changed you-username on dmp and description overview.2

This commit is contained in:
Sofia Papacharalampous 2024-06-06 11:18:27 +03:00
parent 0f2ad074cf
commit 8ab082fa8a
2 changed files with 4 additions and 4 deletions

View File

@ -241,9 +241,9 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
isUserAuthor(userId: Guid): boolean { isUserAuthor(userId: Guid): boolean {
if (this.isAuthenticated() && this.userName) { if (this.isAuthenticated()) {
const principalId: Guid = this.authentication.userId(); const principalId: Guid = this.authentication.userId();
return userId === principalId; return this.userName && (userId === principalId);
} else return false; } else return false;
} }

View File

@ -233,9 +233,9 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
} }
isUserAuthor(userId: Guid): boolean { isUserAuthor(userId: Guid): boolean {
if (this.isAuthenticated() && this.userName) { if (this.isAuthenticated()) {
const principalId: Guid = this.authentication.userId(); const principalId: Guid = this.authentication.userId();
return userId === principalId; return this.userName && userId === principalId;
} else return false; } else return false;
} }