This commit is contained in:
parent
097e48459f
commit
53230dc06f
|
@ -216,24 +216,21 @@ namespace BLL
|
|||
}
|
||||
else
|
||||
{
|
||||
List<string> roleIdList = new List<string>();
|
||||
if (string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
|
||||
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();
|
||||
roleIdList = user.RoleId.Split(',').ToList();
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (buttons.Count() > 0)
|
||||
{
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue