Skip to content

fix(permission): key user selection by id instead of name - #1529

Merged
dataeaseShu merged 1 commit into
mainfrom
fix/permission-selection-by-id
Nov 25, 2026
Merged

dataeaseShu merged 1 commit into
mainfrom
fix/permission-selection-by-id

Conversation

@dataeaseShu

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #1528, which merged before this commit landed. It fixes the remaining name-keyed logic in the restricted-user picker once its search can be narrowed by account:

  • Two users sharing a display name can now appear one at a time in the filtered list, but the merge, restore and select-all paths still matched users by name. Selecting all on a filtered view therefore dropped an already-selected same-name user.
  • The select-all checkbox could also read as checked while only a hidden same-name user was selected; acting on it cleared every selection.
  • Match, merge, restore and the selected-list render key now all use the user id.

Test plan

  • 两个用户同名时:按账号分别搜索并勾选,右侧已选列表同时保留两人
  • 对过滤后的结果点“全选”,另一位已选的同名用户不会被移除
  • 只有隐藏的同名用户被选中时,“全选”不再显示为已勾选
  • 重新打开已保存的规则,之前勾选的用户仍然保留
  • npx vue-tsc -b 与 npx eslint src/views/system/permission/SelectPermission.vue 通过

🤖 Generated with Claude Code

The restricted-user search can now be narrowed by account, so two users
sharing a display name can appear one at a time. The merge, restore and
select-all paths still matched users by name, so selecting all on a
filtered view dropped an already-selected same-name user, and the
select-all checkbox could read as checked while only a hidden same-name
user was selected. Match, merge and render by user id instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dataeaseShu
dataeaseShu merged commit 0326d3d into main Nov 25, 2026
3 checks passed
@dataeaseShu
dataeaseShu deleted the fix/permission-selection-by-id branch November 25, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant