修复超级管理员账号会被禁用发件

This commit is contained in:
eoao
2025-08-04 17:58:06 +08:00
parent 658c1776d5
commit 2437ff4599

View File

@@ -141,7 +141,7 @@ const emailService = {
const userRow = await userService.selectById(c, userId);
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);
}