/// <summary> /// 载入页面关联的按钮配置 /// </summary> /// <param name="loginUser">登录用户</param> /// <param name="page">页面</param> /// <param name="action">动作</param> /// <returns>是否可执行页面动作</returns> bool IPowerChecker.CanDoAction(ILoginUser loginUser, IPageItem page, string action) { if (BusinessContext.Current.IsSystemMode) { return(true); } if (defaults.ContainsKey(action)) { return(defaults[action]); } return(page != null && RoleCache.CanDoAction(loginUser.RoleId, page.Id, action)); }