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) { getUserRole(dmp: DmpModel) {
let role = -1; if (dmp.creator.id === this.currentUserId) {
dmp.users.forEach(user => { return this.language.instant('USER-PROFILE.DMPS.CREATOR');
if (user.id === this.currentUserId) { } else if (dmp.associatedUsers.map(x => x.id).indexOf(this.currentUserId) !== -1) {
role = user.role; return this.language.instant('USER-PROFILE.DMPS.MEMBER');
} }
});
if (role === 0) { return this.language.instant('USER-PROFILE.DMPS.CREATOR'); } else if (role === 1) { return this.language.instant('USER-PROFILE.DMPS.MEMBER'); }
return '';
} }
showAllDmps() { showAllDmps() {