This commit is contained in:
parent
097e48459f
commit
53230dc06f
|
@ -216,22 +216,19 @@ namespace BLL
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
List<string> roleIdList = new List<string>();
|
||||||
if (string.IsNullOrEmpty(projectId))
|
if (string.IsNullOrEmpty(projectId))
|
||||||
{
|
{
|
||||||
|
roleIdList = user.RoleId.Split(',').ToList();
|
||||||
buttons = (from x in db.Sys_ButtonToMenu
|
|
||||||
join y in db.Sys_ButtonPower on x.ButtonToMenuId equals y.ButtonToMenuId
|
|
||||||
where y.RoleId == user.RoleId && y.MenuId == menuId && x.MenuId == menuId
|
|
||||||
select x).ToList();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
List<string> roleIdList = UserService.GetRoleListByProjectIdUserId(projectId, userId);
|
roleIdList = UserService.GetRoleListByProjectIdUserId(projectId, userId);
|
||||||
buttons = (from x in db.Sys_ButtonToMenu
|
|
||||||
join y in db.Sys_ButtonPower on x.ButtonToMenuId equals y.ButtonToMenuId
|
|
||||||
where roleIdList.Contains(y.RoleId) && y.MenuId == menuId && x.MenuId == menuId
|
|
||||||
select x).ToList();
|
|
||||||
}
|
}
|
||||||
|
buttons = (from x in db.Sys_ButtonToMenu
|
||||||
|
join y in db.Sys_ButtonPower on x.ButtonToMenuId equals y.ButtonToMenuId
|
||||||
|
where roleIdList.Contains(y.RoleId) && y.MenuId == menuId && x.MenuId == menuId
|
||||||
|
select x).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue