修复超级管理员账号会被禁用发件
This commit is contained in:
@@ -141,7 +141,7 @@ const emailService = {
|
|||||||
const userRow = await userService.selectById(c, userId);
|
const userRow = await userService.selectById(c, userId);
|
||||||
const roleRow = await roleService.selectById(c, userRow.type);
|
const roleRow = await roleService.selectById(c, userRow.type);
|
||||||
|
|
||||||
if (roleRow.sendType === 'ban') {
|
if (c.env.admin !== userRow.email && roleRow.sendType === 'ban') {
|
||||||
throw new BizError(t('bannedSend'), 403);
|
throw new BizError(t('bannedSend'), 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user