diff --git a/OpenAuth.App/AuthorizeApp.cs b/OpenAuth.App/AuthorizeApp.cs index 92498da9..75a5f3dc 100644 --- a/OpenAuth.App/AuthorizeApp.cs +++ b/OpenAuth.App/AuthorizeApp.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using Infrastructure; using OpenAuth.App.Response; using OpenAuth.Repository.Domain; @@ -41,10 +41,12 @@ namespace OpenAuth.App Roles = service.Roles }; + var ModuleElements=service.ModuleElements; + foreach (var moduleView in user.Modules) { moduleView.Elements = - service.ModuleElements.Where(u => u.ModuleId == moduleView.Id).OrderBy(u => u.Sort).ToList(); + ModuleElements.Where(u => u.ModuleId == moduleView.Id).OrderBy(u => u.Sort).ToList(); } return user;