Exemplo n.º 1
0
        /// <summary>
        /// 获取默认权限按钮
        /// </summary>
        /// <param name="controller"></param>
        /// <returns></returns>
        public static List <Tapp_Button> LoadButton(this Controller controller)
        {
            int        userId      = HttpContext.Current.AppUserId();
            RightHeper rightHelper = new RightHeper();

            return(rightHelper.LoadButton(userId, controller.RouteData.GetRequiredString("Controller"), controller.RouteData.GetRequiredString("Action")));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取权限按钮
        /// </summary>
        /// <param name="controller"></param>
        /// <param name="menuId"></param>
        /// <returns></returns>
        public static List <Tapp_Button> LoadButton(this Controller controller, int menuId)
        {
            int        userId      = HttpContext.Current.AppUserId();
            RightHeper rightHelper = new RightHeper();

            return(rightHelper.LoadButton(userId, menuId));
        }
Exemplo n.º 3
0
        /// <summary>
        /// 获取用户角色
        /// </summary>
        /// <returns></returns>
        public static List <UserRoleDto> LoadUserRole(this Controller controller)
        {
            RightHeper rightHelper = new RightHeper();

            return(rightHelper.LoadUserRole());
        }