Exemplo n.º 1
0
        public ActionResult GetButtonPermission()
        {
            string author = RequestHelper.GetQueryString("author");

            if (author.IsEmpty() || author != "easycms")
            {
                return(Error("请求权限失败"));
            }

            LoginUserDto   loginUserDto = RequestHelper.AdminInfo();
            ResultAdaptDto result       = new ResultAdaptDto();
            var            buttonTags   = _roleApp.GetButtonPermissionList(loginUserDto.RoleId);

            result.Add("isAdmin", loginUserDto.IsSuper);
            result.Add("buttonPermissions", buttonTags);
            return(Json(result));
        }