mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-09 01:17:43 +01:00
Merge pull request #4673 from ninjadq/fix_bug_4665
Fix bug 4665 project admin can not change the role of some user
This commit is contained in:
commit
0f271710ae
@ -135,7 +135,7 @@ export class MemberComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
get onlySelf(): boolean {
|
||||
if (this.selectedRow.length === 1 && this.selectedRow[0].id === this.currentUser.user_id) {
|
||||
if (this.selectedRow.length === 1 && this.selectedRow[0].entity_id === this.currentUser.user_id) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -163,7 +163,7 @@ export class MemberComponent implements OnInit, OnDestroy {
|
||||
if (members && members.length) {
|
||||
let promiseList: any[] = [];
|
||||
members.forEach(member => {
|
||||
if (member.id === this.currentUser.user_id) {
|
||||
if (member.entity_id === this.currentUser.user_id) {
|
||||
let foundMember = this.batchActionInfos.find(batchInfo => batchInfo.name === member.entity_name);
|
||||
this.translate.get("BATCH.SWITCH_FAILURE").subscribe(res => {
|
||||
this.messageHandlerService.handleError(res + ": " + foundMember.name);
|
||||
@ -239,7 +239,7 @@ export class MemberComponent implements OnInit, OnDestroy {
|
||||
if (members && members.length) {
|
||||
let promiseLists: any[] = [];
|
||||
members.forEach(member => {
|
||||
if (member.id === this.currentUser.user_id) {
|
||||
if (member.entity_id === this.currentUser.user_id) {
|
||||
let findedList = this.batchDeletionInfos.find(data => data.name === member.entity_name);
|
||||
this.translate.get("BATCH.DELETED_FAILURE").subscribe(res => {
|
||||
findedList = BathInfoChanges(findedList, res, false, true);
|
||||
|
Loading…
Reference in New Issue
Block a user