This commit is contained in:
parent
2695f4cde6
commit
8d9752936b
|
|
@ -128,6 +128,17 @@ namespace LearningOfficer.OA.Services.LoginMobile
|
||||||
{
|
{
|
||||||
throw new BusinessException("账号或密码错误");
|
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;
|
userResult.UserType = 1;
|
||||||
return userResult;
|
return userResult;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue