移除账号启用状态统一使用归档

This commit is contained in:
2026-07-24 09:53:04 +08:00
parent a9c6578569
commit 13ef357448
13 changed files with 86 additions and 67 deletions

View File

@@ -38,7 +38,7 @@ export class AuthService {
this.recordFailedAttempt(attemptKey);
throw new UnauthorizedException('用户名或密码错误');
}
if (!user.isActive || user.isArchived) {
if (user.isArchived) {
throw new UnauthorizedException('账号已失效,请联系管理员');
}
const valid = await bcrypt.compare(dto.password, user.passwordHash);