minor rollback
This commit is contained in:
parent
c807d28c29
commit
c11ab819cb
|
@ -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 (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');
|
||||
}
|
||||
});
|
||||
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() {
|
||||
|
|
Loading…
Reference in New Issue