fix(系统设置): 操作日志接口增加工作空间日志读取权限

--bug=1027196 --user=宋天阳 【项目设置】项目成员查看项目的操作日志失败
https://www.tapd.cn/55049933/s/1383552
This commit is contained in:
song-tianyang 2023-06-19 18:52:02 +08:00 committed by 建国
parent f2dc4a6503
commit 0c888e3c3a
1 changed files with 3 additions and 2 deletions

View File

@ -9,10 +9,11 @@ import io.metersphere.commons.utils.Pager;
import io.metersphere.log.service.OperatingLogService; import io.metersphere.log.service.OperatingLogService;
import io.metersphere.log.vo.OperatingLogDTO; import io.metersphere.log.vo.OperatingLogDTO;
import io.metersphere.log.vo.OperatingLogRequest; import io.metersphere.log.vo.OperatingLogRequest;
import jakarta.annotation.Resource;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
@ -23,7 +24,7 @@ public class OperatingLogController {
private OperatingLogService operatingLogService; private OperatingLogService operatingLogService;
@PostMapping("/list/{goPage}/{pageSize}") @PostMapping("/list/{goPage}/{pageSize}")
@RequiresPermissions(PermissionConstants.SYSTEM_OPERATING_LOG_READ) @RequiresPermissions(value = {PermissionConstants.WORKSPACE_OPERATING_LOG_READ, PermissionConstants.SYSTEM_OPERATING_LOG_READ}, logical = Logical.OR)
public Pager<List<OperatingLogDTO>> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody OperatingLogRequest request) { public Pager<List<OperatingLogDTO>> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody OperatingLogRequest request) {
Page<Object> page = PageHelper.startPage(goPage, pageSize, true); Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
return PageUtils.setPageInfo(page, operatingLogService.list(request)); return PageUtils.setPageInfo(page, operatingLogService.list(request));