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:
parent
f5afb65df8
commit
ef6b2ceb22
|
|
@ -3465,12 +3465,14 @@ export class AuthorizationApplicationService {
|
||||||
const limit = params.limit ?? 20
|
const limit = params.limit ?? 20
|
||||||
const includeRevoked = params.includeRevoked ?? false
|
const includeRevoked = params.includeRevoked ?? false
|
||||||
|
|
||||||
// 获取所有授权(根据是否包含已撤销)
|
// 获取所有授权(管理员应该能看到所有已授权的用户,包括考核期的)
|
||||||
let allAuthorizations: AuthorizationRole[]
|
let allAuthorizations: AuthorizationRole[] = await this.authorizationRepository.findByStatus(
|
||||||
|
AuthorizationStatus.AUTHORIZED,
|
||||||
|
)
|
||||||
|
|
||||||
|
// 按 roleType 过滤
|
||||||
if (params.roleType) {
|
if (params.roleType) {
|
||||||
allAuthorizations = await this.authorizationRepository.findAllActive(params.roleType)
|
allAuthorizations = allAuthorizations.filter((a) => a.roleType === params.roleType)
|
||||||
} else {
|
|
||||||
allAuthorizations = await this.authorizationRepository.findAllActive()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果包含已撤销的,需要添加已撤销的授权
|
// 如果包含已撤销的,需要添加已撤销的授权
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue