fix(项目管理): 项目管理模块中的环境管理权限增加工作空间角色环境权限的支持

--bug=1027180 --user=宋天阳 【项目设置】工作空间成员-赋予创建环境权限-但是无法创建成功
https://www.tapd.cn/55049933/s/1383469;--bug=1027175 --user=宋天阳
【项目设置】项目环境-复制环境-直接跳到了系统设置页面 https://www.tapd.cn/55049933/s/1383470
This commit is contained in:
song-tianyang 2023-06-19 18:13:09 +08:00 committed by 刘瑞斌
parent 78a3b1ce96
commit f2dc4a6503
1 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ public class TestEnvironmentController {
}
@PostMapping("/add")
@RequiresPermissions(value = {PermissionConstants.PROJECT_ENVIRONMENT_READ_CREATE, PermissionConstants.PROJECT_ENVIRONMENT_READ_COPY}, logical = Logical.OR)
@RequiresPermissions(value = {PermissionConstants.PROJECT_ENVIRONMENT_READ_CREATE, PermissionConstants.PROJECT_ENVIRONMENT_READ_COPY, PermissionConstants.WORKSPACE_PROJECT_ENVIRONMENT_READ_CREATE, PermissionConstants.WORKSPACE_PROJECT_ENVIRONMENT_READ_COPY}, logical = Logical.OR)
@MsAuditLog(module = OperLogModule.PROJECT_ENVIRONMENT_SETTING, type = OperLogConstants.CREATE, title = "#apiTestEnvironmentWithBLOBs.name", project = "#apiTestEnvironmentWithBLOBs.projectId", msClass = BaseEnvironmentService.class)
public String create(@RequestPart("request") TestEnvironmentDTO apiTestEnvironmentWithBLOBs, @RequestPart(value = "files", required = false) List<MultipartFile> sslFiles, @RequestPart(value = "variablesFiles", required = false) List<MultipartFile> variableFile) {
checkParams(apiTestEnvironmentWithBLOBs);
@ -79,7 +79,7 @@ public class TestEnvironmentController {
}
@PostMapping("/import")
@RequiresPermissions("PROJECT_ENVIRONMENT:READ+IMPORT")
@RequiresPermissions(value = {PermissionConstants.PROJECT_ENVIRONMENT_READ_IMPORT, PermissionConstants.WORKSPACE_PROJECT_ENVIRONMENT_READ_IMPORT}, logical = Logical.OR)
public String create(@RequestBody List<TestEnvironmentDTO> environments) {
environments.forEach(this::checkParams);
return baseEnvironmentService.importEnvironment(environments);