20230223项目用户没有项目角色,无法登录系统

This commit is contained in:
2023-02-23 16:18:50 +08:00
parent e2076c4d4b
commit 1e79fa5a96
3 changed files with 15 additions and 10 deletions
+13 -9
View File
@@ -604,17 +604,21 @@ namespace FineUIPro.Web
{
string roleTypes = string.Empty;
string roleCNs = string.Empty;
string[] roles = projectUser.RoleId.Split(',');
foreach (var item in roles)
if (projectUser.RoleId != null && projectUser.RoleId.Length > 0)
{
var role = BLL.RoleService.GetRoleByRoleId(item);
if (role != null && !string.IsNullOrEmpty(role.RoleType))
string[] roles = projectUser.RoleId.Split(',');
foreach (var item in roles)
{
roleTypes = role.RoleType + ",";
}
if (role != null && !string.IsNullOrEmpty(role.CNProfessionalIds))
{
roleCNs = role.CNProfessionalIds + ",";
var role = BLL.RoleService.GetRoleByRoleId(item);
if (role != null && !string.IsNullOrEmpty(role.RoleType))
{
roleTypes = role.RoleType + ",";
}
if (role != null && !string.IsNullOrEmpty(role.CNProfessionalIds))
{
roleCNs = role.CNProfessionalIds + ",";
}
}
}
if (roleTypes.Contains(Const.Role_III))