fix(接口测试): 项目只读用户进入接口定义页面自动跳转到系统设置

--bug=1019304 --user=李玉号 项目只读用户进入接口定义页面自动跳转到系统设置
https://www.tapd.cn/55049933/s/1287218
This commit is contained in:
shiziyuan9527 2022-11-03 11:12:43 +08:00 committed by lyh
parent 9ff5930c62
commit 9e04fcdac6
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package io.metersphere.api.controller;
import io.metersphere.api.service.ApiDefinitionEnvService;
import io.metersphere.base.domain.ApiDefinitionEnv;
import io.metersphere.commons.constants.PermissionConstants;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.*;
@ -20,7 +21,7 @@ public class ApiDefinitionEnvController {
}
@PostMapping(value = "/create")
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_CREATE_API)
@RequiresPermissions(value = {PermissionConstants.PROJECT_API_DEFINITION_READ_CREATE_API, PermissionConstants.PROJECT_API_DEFINITION_READ}, logical = Logical.OR)
public void create(@RequestBody ApiDefinitionEnv request) {
apiDefinitionEnvService.insert(request);
}