public async Task <IActionResult> Index() { UserLogin user = JsonConvert.DeserializeObject <UserLogin>(GetCookies(CommonData.TokenName)); IList <SysMenu> sysMenus = await sysMenuService.GetAll(); if (!user.isSuperAdmin) { List <long> authorizeMenuIdList = await userMenuService.GetUserMenuIdList(user); sysMenus = sysMenus.Where(p => authorizeMenuIdList.Contains(p.Id)).ToList(); } ViewBag.MenuList = sysMenus; ViewBag.UserLogin = user; return(View()); }