Skip to content

Commit

Permalink
Merge pull request rancher#10895 from ly5156/project-mem-edtior
Browse files Browse the repository at this point in the history
fix(Project/ClusterMemberEditor): fix find roleTemplates bug
  • Loading branch information
richard-cox authored Aug 14, 2024
2 parents 932087c + 3592f99 commit cb6adea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shell/components/form/Members/ClusterPermissionsEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export default {
},
customPermissionsUpdate() {
return this.customPermissions.reduce((acc, customPermissionsItem) => {
const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.displayName === customPermissionsItem.label);
const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.id === customPermissionsItem.key);
if (lockedExist.locked) {
customPermissionsItem['locked'] = true;
Expand Down
2 changes: 1 addition & 1 deletion shell/components/form/ProjectMemberEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default {
},
customPermissionsUpdate() {
return this.customPermissions.reduce((acc, customPermissionsItem) => {
const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.displayName === customPermissionsItem.label);
const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.id === customPermissionsItem.key);
if (lockedExist.locked) {
customPermissionsItem['locked'] = true;
Expand Down

0 comments on commit cb6adea

Please sign in to comment.