Skip to content

fix(permission): clear all restricted users, not just filtered - #1531

Merged
dataeaseShu merged 1 commit into
mainfrom
fix/permission-clear-all
Nov 25, 2026
Merged

dataeaseShu merged 1 commit into
mainfrom
fix/permission-clear-all

Conversation

@dataeaseShu

Copy link
Copy Markdown
Contributor

Summary

  • 权限规则 → 选择受限用户:在搜索框里输入关键字后点「清空」,之前只重置了勾选模型并走合并逻辑,而合并逻辑会刻意保留当前搜索结果之外的用户。结果右侧待提交列表仍留着没被搜到的已选用户,保存时一并提交。
  • 「清空」现在直接重置待提交列表和勾选模型,不再经过按搜索结果合并的路径。

Steps to reproduce

  1. 两名用户同名,或任意用户 A、B 均已选中
  2. 在搜索框按账号只筛出 A
  3. 点「清空」→ 当前版本 B 仍留在右侧已选列表并会被提交

Test plan

  • 搜索状态下点「清空」,右侧已选列表归零,保存后规则不含任何受限用户
  • 无搜索时「清空」行为不变
  • 单个用户的移除按钮、全选/半选状态不受影响
  • npx vue-tsc -b 与 npx eslint src/views/system/permission/SelectPermission.vue 通过

🤖 Generated with Claude Code

"清空" reset the checkbox model and then ran it through the merge handler,
which deliberately keeps selections outside the current search. With a
search active, the hidden users stayed in the pending list and were
submitted with the rule. Reset the pending list and the model directly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dataeaseShu
dataeaseShu merged commit 613fde9 into main Nov 25, 2026
3 checks passed
@dataeaseShu
dataeaseShu deleted the fix/permission-clear-all branch November 25, 2026 09:13
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