1、全面实现按登录用户动态加载按钮;

2、优化模块授权代码;
3、优化内部功能加载模块的权限控制,比如:拥有模块授权功能的用户给别人授权时,只能访问到自己拥有的模块;
This commit is contained in:
yubaolee
2015-12-07 15:22:01 +08:00
parent 35ef1a6e8b
commit 975632c81e
14 changed files with 165 additions and 53 deletions

View File

@@ -4,6 +4,8 @@ using OpenAuth.Domain;
using System;
using System.Linq;
using System.Web.Mvc;
using Infrastructure.Helper;
using OpenAuth.App.ViewModel;
namespace OpenAuth.Mvc.Controllers
{
@@ -50,7 +52,7 @@ namespace OpenAuth.Mvc.Controllers
/// </summary>
public string LoadForTree()
{
var orgs = _app.LoadForTree();
var orgs = SessionHelper.GetSessionUser<LoginUserVM>().Modules;
//添加根节点
orgs.Add(new Module
{
@@ -70,7 +72,7 @@ namespace OpenAuth.Mvc.Controllers
{
Id = 0,
ParentId = -1,
Name = "已为用户分配的模块",
Name = "用户可访问模块(包括角色所拥有的)",
CascadeId = "0"
});
return JsonHelper.Instance.Serialize(orgs);