fix: MongoDB 下通过角色获取相关菜单比对错误

#Comment
导致用户获取不到相关角色菜单
This commit is contained in:
Argo Zhang 2019-08-24 10:20:48 +08:00
parent fb666e8c35
commit 3a4b77e837
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ namespace Bootstrap.DataAccess.MongoDB
}).Distinct().ToList();
var menus = DbManager.Menus.Find(FilterDefinition<BootstrapMenu>.Empty).ToList()
.Where(m => roles.Any(r => r.RoleName.Equals("Administrators", StringComparison.OrdinalIgnoreCase) || r.Menus.Any(rm => rm.Equals(m.Url, StringComparison.OrdinalIgnoreCase))))
.Where(m => roles.Any(r => r.RoleName.Equals("Administrators", StringComparison.OrdinalIgnoreCase) || r.Menus.Any(rm => rm.Equals(m.Id, StringComparison.OrdinalIgnoreCase))))
.ToList();
menus.ForEach(m =>
{