Skip to content

Commit

Permalink
部分权限验证
Browse files Browse the repository at this point in the history
  • Loading branch information
liukuo362573 committed Jan 25, 2022
1 parent 6ff260c commit c5910aa
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
Expand Up @@ -56,6 +56,7 @@ public async Task<IActionResult> GetUserTreeListJson(DepartmentListParam param)
}

[HttpGet]
[AuthorizeFilter("organization:department:view")]
public async Task<IActionResult> GetFormJson(long id)
{
TData<DepartmentEntity> obj = await departmentBLL.GetEntity(id);
Expand Down
Expand Up @@ -53,6 +53,7 @@ public async Task<IActionResult> GetPageListJson(NewsListParam param, Pagination
}

[HttpGet]
[AuthorizeFilter("organization:news:view")]
public async Task<IActionResult> GetFormJson(long id)
{
TData<NewsEntity> obj = await newsBLL.GetEntity(id);
Expand Down
Expand Up @@ -49,6 +49,7 @@ public async Task<IActionResult> GetPageListJson(PositionListParam param, Pagina
}

[HttpGet]
[AuthorizeFilter("organization:position:view")]
public async Task<IActionResult> GetFormJson(long id)
{
TData<PositionEntity> obj = await positionBLL.GetEntity(id);
Expand Down
Expand Up @@ -21,11 +21,13 @@ public class LogApiController : BaseController
private LogApiBLL logApiBLL = new LogApiBLL();

#region 视图功能
[AuthorizeFilter("system:logapi:view")]
public IActionResult LogApiIndex()
{
return View();
}

[AuthorizeFilter("system:logapi:view")]
public IActionResult LogApiDetail()
{
return View();
Expand All @@ -34,20 +36,23 @@ public IActionResult LogApiDetail()

#region 获取数据
[HttpGet]
[AuthorizeFilter("system:logapi:search")]
public async Task<IActionResult> GetListJson(LogApiListParam param)
{
TData<List<LogApiEntity>> obj = await logApiBLL.GetList(param);
return Json(obj);
}

[HttpGet]
[AuthorizeFilter("system:logapi:search")]
public async Task<IActionResult> GetPageListJson(LogApiListParam param, Pagination pagination)
{
TData<List<LogApiEntity>> obj = await logApiBLL.GetPageList(param, pagination);
return Json(obj);
}

[HttpGet]
[AuthorizeFilter("system:logapi:view")]
public async Task<IActionResult> GetFormJson(long id)
{
TData<LogApiEntity> obj = await logApiBLL.GetEntity(id);
Expand All @@ -57,13 +62,15 @@ public async Task<IActionResult> GetFormJson(long id)

#region 提交数据
[HttpPost]
[AuthorizeFilter("system:logapi:delete")]
public async Task<IActionResult> DeleteFormJson(string ids)
{
TData obj = await logApiBLL.DeleteForm(ids);
return Json(obj);
}

[HttpPost]
[AuthorizeFilter("system:logapi:delete")]
public async Task<IActionResult> RemoveAllFormJson()
{
TData obj = await logApiBLL.RemoveAllForm();
Expand Down
Expand Up @@ -49,6 +49,7 @@ public async Task<IActionResult> GetPageListJson(LogOperateListParam param, Pagi
}

[HttpGet]
[AuthorizeFilter("system:logoperate:view")]
public async Task<IActionResult> GetFormJson(long id)
{
TData<LogOperateEntity> obj = await logOperateBLL.GetEntity(id);
Expand Down

0 comments on commit c5910aa

Please sign in to comment.