fix 下级部门用户不应该访问到上级树节点
This commit is contained in:
@@ -83,17 +83,18 @@ namespace Ewide.Core.Service
|
||||
if (dataScopes.Count < 1)
|
||||
return dataScopeList;
|
||||
|
||||
// 此处获取所有的上级节点,用于构造完整树
|
||||
dataScopes.ForEach(u =>
|
||||
{
|
||||
var sysOrg = _sysOrgRep.DetachedEntities.FirstOrDefault(c => c.Id == u);
|
||||
var parentAndChildIdListWithSelf = sysOrg.Pids.TrimEnd(',').Replace("[", "").Replace("]", "")
|
||||
.Split(",").ToList();
|
||||
dataScopeList.AddRange(parentAndChildIdListWithSelf);
|
||||
// 不需要去查找上级节点
|
||||
|
||||
// 添加本级(不知道为什么框架在这里排除了本级)
|
||||
dataScopeList.Add(u);
|
||||
});
|
||||
// 此处获取所有的上级节点,用于构造完整树
|
||||
//dataScopes.ForEach(u =>
|
||||
//{
|
||||
// var sysOrg = _sysOrgRep.DetachedEntities.FirstOrDefault(c => c.Id == u);
|
||||
// var parentAndChildIdListWithSelf = sysOrg.Pids.TrimEnd(',').Replace("[", "").Replace("]", "")
|
||||
// .Split(",").ToList();
|
||||
// dataScopeList.AddRange(parentAndChildIdListWithSelf);
|
||||
//});
|
||||
|
||||
dataScopeList = dataScopes;
|
||||
}
|
||||
return dataScopeList.Distinct().ToList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user