mirror of
https://github.com/certd/certd.git
synced 2026-04-14 20:40:53 +08:00
perf: 禁用readonly用户
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
|
||||
update sys_user set status = 0 where id = 2;
|
||||
|
||||
@@ -35,6 +35,9 @@ export class LoginService {
|
||||
if (!right) {
|
||||
throw new CommonException('用户名或密码错误');
|
||||
}
|
||||
if (info.status === 0) {
|
||||
throw new CommonException('用户已被禁用');
|
||||
}
|
||||
|
||||
const roleIds = await this.roleService.getRoleIdsByUserId(info.id);
|
||||
return this.generateToken(info, roleIds);
|
||||
|
||||
Reference in New Issue
Block a user