From f2dc4a65032e5c28519a10b947e61c182faa27a2 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Mon, 19 Jun 2023 18:13:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E7=8E=AF=E5=A2=83=E7=AE=A1=E7=90=86=E6=9D=83=E9=99=90?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B7=A5=E4=BD=9C=E7=A9=BA=E9=97=B4=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E7=8E=AF=E5=A2=83=E6=9D=83=E9=99=90=E7=9A=84=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1027180 --user=宋天阳 【项目设置】工作空间成员-赋予创建环境权限-但是无法创建成功 https://www.tapd.cn/55049933/s/1383469;--bug=1027175 --user=宋天阳 【项目设置】项目环境-复制环境-直接跳到了系统设置页面 https://www.tapd.cn/55049933/s/1383470 --- .../environment/controller/TestEnvironmentController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/controller/TestEnvironmentController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/controller/TestEnvironmentController.java index 97013f8d38..bc1343509d 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/controller/TestEnvironmentController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/controller/TestEnvironmentController.java @@ -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 sslFiles, @RequestPart(value = "variablesFiles", required = false) List 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 environments) { environments.forEach(this::checkParams); return baseEnvironmentService.importEnvironment(environments);