minor rollback

This commit is contained in:
George Kalampokis 2020-03-09 16:50:12 +02:00
parent c807d28c29
commit c11ab819cb
1 changed files with 5 additions and 8 deletions

View File

@ -77,14 +77,11 @@ export class UserProfileComponent extends BaseComponent implements OnInit, OnDes
}
getUserRole(dmp: DmpModel) {
let role = -1;
dmp.users.forEach(user => {
if (user.id === this.currentUserId) {
role = user.role;
}
});
if (role === 0) { return this.language.instant('USER-PROFILE.DMPS.CREATOR'); } else if (role === 1) { return this.language.instant('USER-PROFILE.DMPS.MEMBER'); }
return '';
if (dmp.creator.id === this.currentUserId) {
return this.language.instant('USER-PROFILE.DMPS.CREATOR');
} else if (dmp.associatedUsers.map(x => x.id).indexOf(this.currentUserId) !== -1) {
return this.language.instant('USER-PROFILE.DMPS.MEMBER');
}
}
showAllDmps() {