fix(authorization): show all authorized users in admin list including those in assessment period

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 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-04 00:04:24 -08:00
parent f5afb65df8
commit ef6b2ceb22
1 changed files with 7 additions and 5 deletions

View File

@ -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)
}
// 如果包含已撤销的,需要添加已撤销的授权