This commit is contained in:
huzhiyun 2026-01-26 17:38:01 +08:00
parent 2695f4cde6
commit 8d9752936b
1 changed files with 11 additions and 0 deletions

View File

@ -128,6 +128,17 @@ namespace LearningOfficer.OA.Services.LoginMobile
{
throw new BusinessException("账号或密码错误");
}
var per = await _db.Queryable<OaUserPermissions>()
.Where(s => s.UserId == userResult.Id)
.FirstAsync();
if (per == null)
{
throw new BusinessException("用户权限配置错误,请联系管理员");
}
if (per.RoleEnum != SysRoleEnum.TeamLeader && per.RoleEnum != SysRoleEnum.LearningOfficer)
{
throw new BusinessException("只有组长/学习官可以登录");
}
userResult.UserType = 1;
return userResult;
}