Repository navigation
fix(users): 隐藏企业员工开关不再隐藏非企业用户 - #22
Merged
Merged
Conversation
- 过滤条件改为:无未软删除企业成员关系的用户 OR 有效企业负责人 - 用户 status=active 约束只作用于企业负责人,禁用的非企业用户照常显示 - 已退出企业(成员关系软删除)的用户按非企业用户展示 - 集成测试修正错误预期,新增与状态筛选组合的用例 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
用户管理页「隐藏企业员工」开关(#21 引入)开启后,过滤条件要求"必须是有效企业负责人",导致所有非企业用户也被隐藏;且全局
status=active条件会把禁用的非企业用户一并过滤。修复
ListWithFilters的HideEnterpriseEmployees条件改为保留:CountActiveOwners一致)企业成员 / 管理员 / 失效负责人仍被隐藏。生成的 SQL:
测试
go build、go vet -tags integration、handler 单测;集成测试因本地无 Docker 未运行,依赖 CI🤖 Generated with Claude Code