From 1f1230e4885d452cfbdb71aa8ec47a1ffb4c58df Mon Sep 17 00:00:00 2001 From: Argo-MacBookPro Date: Fri, 1 Mar 2019 15:43:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9A=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=BA=94=E7=94=A8=E5=8F=AF=E4=BB=A5=E7=9C=8B=E5=88=B0?= =?UTF-8?q?=E6=9C=AA=E6=8E=88=E6=9D=83=E5=BA=94=E7=94=A8=20#IS5F1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Models/NavigatorBarModel.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Bootstrap.Admin/Models/NavigatorBarModel.cs b/Bootstrap.Admin/Models/NavigatorBarModel.cs index aebab48d..3b93162b 100644 --- a/Bootstrap.Admin/Models/NavigatorBarModel.cs +++ b/Bootstrap.Admin/Models/NavigatorBarModel.cs @@ -1,7 +1,9 @@ using Bootstrap.DataAccess; using Bootstrap.Security; using Microsoft.AspNetCore.Mvc; +using System; using System.Collections.Generic; +using System.Linq; namespace Bootstrap.Admin.Models { @@ -17,7 +19,8 @@ namespace Bootstrap.Admin.Models public NavigatorBarModel(ControllerBase controller) : base(controller.User.Identity) { Navigations = MenuHelper.RetrieveSystemMenus(UserName, $"~{controller.HttpContext.Request.Path}"); - Applications = DictHelper.RetrieveApps(); + var authApps = AppHelper.RetrievesByUserName(controller.User.Identity.Name); + Applications = DictHelper.RetrieveApps().Where(app => app.Key == "0" || authApps.Any(key => key.Equals(app.Key, StringComparison.OrdinalIgnoreCase))); } /// ///