From ef6b2ceb22dc90dae5d1bb12ef86719d5955f97e Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 4 Jan 2026 00:04:24 -0800 Subject: [PATCH] fix(authorization): show all authorized users in admin list including those in assessment period MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously used findAllActive() which only returned users with benefitActive=true, causing users still in assessment period to be hidden. Now uses findByStatus() to show all AUTHORIZED users regardless of benefit activation status. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../services/authorization-application.service.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/services/authorization-service/src/application/services/authorization-application.service.ts b/backend/services/authorization-service/src/application/services/authorization-application.service.ts index 64014d5b..2bc65048 100644 --- a/backend/services/authorization-service/src/application/services/authorization-application.service.ts +++ b/backend/services/authorization-service/src/application/services/authorization-application.service.ts @@ -3465,12 +3465,14 @@ export class AuthorizationApplicationService { const limit = params.limit ?? 20 const includeRevoked = params.includeRevoked ?? false - // čŽˇå–æ‰€æœ‰æŽˆæƒīŧˆæ šæŽæ˜¯åĻ包åĢåˇ˛æ’¤é”€īŧ‰ - let allAuthorizations: AuthorizationRole[] + // čŽˇå–æ‰€æœ‰æŽˆæƒīŧˆįŽĄį†å‘˜åē”č¯ĨčƒŊįœ‹åˆ°æ‰€æœ‰åˇ˛æŽˆæƒįš„į”¨æˆˇīŧŒåŒ…æ‹Ŧč€ƒæ ¸æœŸįš„īŧ‰ + let allAuthorizations: AuthorizationRole[] = await this.authorizationRepository.findByStatus( + AuthorizationStatus.AUTHORIZED, + ) + + // 按 roleType čŋ‡æģ¤ if (params.roleType) { - allAuthorizations = await this.authorizationRepository.findAllActive(params.roleType) - } else { - allAuthorizations = await this.authorizationRepository.findAllActive() + allAuthorizations = allAuthorizations.filter((a) => a.roleType === params.roleType) } // åĻ‚æžœåŒ…åĢåˇ˛æ’¤é”€įš„īŧŒéœ€čρæˇģåŠ åˇ˛æ’¤é”€įš„æŽˆæƒ