From 473641b155de74bec1b592dae0eb4e8438f5bd07 Mon Sep 17 00:00:00 2001 From: Argo-Surface Date: Mon, 25 Feb 2019 15:14:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E4=BB=A3=E7=A0=81=EF=BC=9AAp?= =?UTF-8?q?pHelper=E6=96=B9=E6=B3=95RetrieveAppsByUserName=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E4=B8=BARetrievesByUserName?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Startup.cs | 3 +-- Bootstrap.DataAccess.MongoDB/App.cs | 2 +- Bootstrap.DataAccess/App.cs | 2 +- Bootstrap.DataAccess/Helper/AppHelper.cs | 5 ++--- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Bootstrap.Admin/Startup.cs b/Bootstrap.Admin/Startup.cs index 4cf94738..bf51014d 100644 --- a/Bootstrap.Admin/Startup.cs +++ b/Bootstrap.Admin/Startup.cs @@ -1,5 +1,4 @@ using Bootstrap.DataAccess; -using Bootstrap.Security.DataAccess; using Bootstrap.Security.Filter; using Longbow.Web; using Longbow.Web.SignalR; @@ -125,7 +124,7 @@ namespace Bootstrap.Admin app.UseResponseCompression(); app.UseStaticFiles(); app.UseAuthentication(); - app.UseBootstrapAdminAuthorization(RoleHelper.RetrieveRolesByUserName, RoleHelper.RetrieveRolesByUrl, AppHelper.RetrieveAppsByUserName); + app.UseBootstrapAdminAuthorization(RoleHelper.RetrieveRolesByUserName, RoleHelper.RetrieveRolesByUrl, AppHelper.RetrievesByUserName); app.UseCacheManagerCorsHandler(); app.UseSignalR(routes => { routes.MapHub("/NotiHub"); }); app.UseMvc(routes => diff --git a/Bootstrap.DataAccess.MongoDB/App.cs b/Bootstrap.DataAccess.MongoDB/App.cs index 7aa267f8..7c67b585 100644 --- a/Bootstrap.DataAccess.MongoDB/App.cs +++ b/Bootstrap.DataAccess.MongoDB/App.cs @@ -41,7 +41,7 @@ namespace Bootstrap.DataAccess.MongoDB /// /// /// - public override IEnumerable RetrieveAppsByUserName(string userName) + public override IEnumerable RetrievesByUserName(string userName) { var ret = new List(); var roles = RoleHelper.RetrieveRolesByUserName(userName); diff --git a/Bootstrap.DataAccess/App.cs b/Bootstrap.DataAccess/App.cs index 944d69e7..35b0c10b 100644 --- a/Bootstrap.DataAccess/App.cs +++ b/Bootstrap.DataAccess/App.cs @@ -46,7 +46,7 @@ namespace Bootstrap.DataAccess /// /// /// - public virtual IEnumerable RetrieveAppsByUserName(string userName) => DbHelper.RetrieveAppsByUserName(userName); + public virtual IEnumerable RetrievesByUserName(string userName) => DbHelper.RetrieveAppsByUserName(userName); /// /// 根据角色ID以及选定的App ID,保到角色应用表 diff --git a/Bootstrap.DataAccess/Helper/AppHelper.cs b/Bootstrap.DataAccess/Helper/AppHelper.cs index 7ba9f599..49c76a50 100644 --- a/Bootstrap.DataAccess/Helper/AppHelper.cs +++ b/Bootstrap.DataAccess/Helper/AppHelper.cs @@ -1,5 +1,4 @@ -using Bootstrap.Security.DataAccess; -using Longbow.Cache; +using Longbow.Cache; using Longbow.Data; using System.Collections.Generic; @@ -34,6 +33,6 @@ namespace Bootstrap.DataAccess /// /// /// - public static IEnumerable RetrieveAppsByUserName(string userName) => DbContextManager.Create().RetrieveAppsByUserName(userName); + public static IEnumerable RetrievesByUserName(string userName) => DbContextManager.Create().RetrievesByUserName(userName); } }