Skip to content

Commit

Permalink
部分权限验证
Browse files Browse the repository at this point in the history
  • Loading branch information
liukuo362573 committed Jan 24, 2022
1 parent 4ef52f5 commit 6ff260c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 0 deletions.
Expand Up @@ -86,13 +86,15 @@ public async Task<IActionResult> GetPageListJson(UserListParam param, Pagination
}

[HttpGet]
[AuthorizeFilter("organization:user:view")]
public async Task<IActionResult> GetFormJson(long id)
{
TData<UserEntity> obj = await userBLL.GetEntity(id);
return Json(obj);
}

[HttpGet]
[AuthorizeFilter("organization:user:view")]
public async Task<IActionResult> GetUserAuthorizeJson()
{
TData<UserAuthorizeInfo> obj = new TData<UserAuthorizeInfo>();
Expand Down
Expand Up @@ -50,6 +50,7 @@ public async Task<IActionResult> GetPageListJson(AutoJobListParam param, Paginat
}

[HttpGet]
[AuthorizeFilter("system:autojob:view")]
public async Task<IActionResult> GetFormJson(long id)
{
TData<AutoJobEntity> obj = await autoJobBLL.GetEntity(id);
Expand Down
Expand Up @@ -39,12 +39,14 @@ public async Task<IActionResult> GetListJson(AutoJobLogListParam param)
TData<List<AutoJobLogEntity>> obj = await autoJobLogBLL.GetList(param);
return Json(obj);
}

[HttpGet]
public async Task<IActionResult> GetPageListJson(AutoJobLogListParam param, Pagination pagination)
{
TData<List<AutoJobLogEntity>> obj = await autoJobLogBLL.GetPageList(param, pagination);
return Json(obj);
}

[HttpGet]
public async Task<IActionResult> GetFormJson(long id)
{
Expand All @@ -60,6 +62,7 @@ public async Task<IActionResult> SaveFormJson(AutoJobLogEntity entity)
TData<string> obj = await autoJobLogBLL.SaveForm(entity);
return Json(obj);
}

[HttpPost]
public async Task<IActionResult> DeleteFormJson(string ids)
{
Expand Down
Expand Up @@ -41,13 +41,15 @@ public async Task<IActionResult> GetTableListJson(string tableName)
TData<List<TableInfo>> obj = await databaseTableBLL.GetTableList(tableName);
return Json(obj);
}

[HttpGet]
[AuthorizeFilter("system:datatable:search")]
public async Task<IActionResult> GetTablePageListJson(string tableName, Pagination pagination)
{
TData<List<TableInfo>> obj = await databaseTableBLL.GetTablePageList(tableName, pagination);
return Json(obj);
}

[HttpGet]
public async Task<IActionResult> GetTableFieldListJson(string tableName)
{
Expand Down
Expand Up @@ -56,6 +56,7 @@ public async Task<IActionResult> GetMenuTreeListJson(MenuListParam param)
}

[HttpGet]
[AuthorizeFilter("system:menu:view")]
public async Task<IActionResult> GetFormJson(long id)
{
TData<MenuEntity> obj = await menuBLL.GetEntity(id);
Expand Down
Expand Up @@ -46,6 +46,7 @@ public async Task<IActionResult> GetPageListJson(RoleListParam param, Pagination
}

[HttpGet]
[AuthorizeFilter("system:role:view")]
public async Task<IActionResult> GetFormJson(long id)
{
TData<RoleEntity> obj = await roleBLL.GetEntity(id);
Expand Down
Expand Up @@ -16,6 +16,7 @@ namespace YiSha.Admin.Web.Areas.ToolManage.Controllers
public class ServerController : BaseController
{
#region 视图功能
[AuthorizeFilter("tool:server:view")]
public IActionResult ServerIndex()
{
return View();
Expand All @@ -24,6 +25,7 @@ public IActionResult ServerIndex()

#region 获取数据
[HttpGet]
[AuthorizeFilter("tool:server:view")]
public IActionResult GetServerJson()
{
TData<ComputerInfo> obj = new TData<ComputerInfo>();
Expand Down

0 comments on commit 6ff260c

Please sign in to comment.