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:
parent
cb4b47b59d
commit
c30af4e459
|
@ -19,6 +19,7 @@ import io.metersphere.commons.utils.Pager;
|
|||
import io.metersphere.controller.request.EnvironmentRequest;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
@ -66,7 +67,7 @@ public class ApiTestEnvironmentController {
|
|||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_ENVIRONMENT_READ_CREATE)
|
||||
@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, content = "#msClass.getLogDetails(#apiTestEnvironmentWithBLOBs.id)", msClass = ApiTestEnvironmentService.class)
|
||||
public String create(@RequestPart("request") ApiTestEnvironmentDTO apiTestEnvironmentWithBLOBs, @RequestPart(value = "files", required = false) List<MultipartFile> sslFiles) {
|
||||
checkParams(apiTestEnvironmentWithBLOBs);
|
||||
|
@ -74,7 +75,7 @@ public class ApiTestEnvironmentController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/update")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_ENVIRONMENT_READ_EDIT)
|
||||
@RequiresPermissions(value = {PermissionConstants.PROJECT_ENVIRONMENT_READ_EDIT, PermissionConstants.WORKSPACE_PROJECT_ENVIRONMENT_READ_EDIT}, logical = Logical.OR)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_ENVIRONMENT_SETTING, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#apiTestEnvironment.id)", content = "#msClass.getLogDetails(#apiTestEnvironment.id)", msClass = ApiTestEnvironmentService.class)
|
||||
public void update(@RequestPart("request") ApiTestEnvironmentDTO apiTestEnvironment, @RequestPart(value = "files", required = false) List<MultipartFile> sslFiles) {
|
||||
checkParams(apiTestEnvironment);
|
||||
|
|
Loading…
Reference in New Issue