fix(系统设置): 模板富文本框图片预览权限认证

This commit is contained in:
AgAngle 2024-08-01 11:01:35 +08:00 committed by 刘瑞斌
parent 1f77a8db41
commit 46259da117
2 changed files with 6 additions and 3 deletions

View File

@ -48,6 +48,9 @@ public class FilterChainUtils {
filterChainDefinitionMap.put("/bug/attachment/preview/md/**", "anon");
//计划报告富文本访问
filterChainDefinitionMap.put("/test-plan/report/preview/md/**", "anon");
//模板富文本框图片预览
filterChainDefinitionMap.put("/organization/template/img/preview/**", "anon");
filterChainDefinitionMap.put("/project/template/img/preview/**", "anon");
filterChainDefinitionMap.put("/system/version/current", "anon");

View File

@ -108,12 +108,12 @@ public class ProjectTemplateController {
return commonFileService.uploadTempImgFile(file);
}
@GetMapping(value = "/img/preview/{organizationId}/{fileId}/{compressed}")
@GetMapping(value = "/img/preview/{projectId}/{fileId}/{compressed}")
@Operation(summary = "富文本图片-预览")
public ResponseEntity<byte[]> previewImg(@PathVariable String organizationId,
public ResponseEntity<byte[]> previewImg(@PathVariable String projectId,
@PathVariable String fileId,
@Schema(description = "是否是压缩图片")
@PathVariable("compressed") boolean compressed) {
return projectTemplateservice.previewImg(organizationId, fileId, compressed);
return projectTemplateservice.previewImg(projectId, fileId, compressed);
}
}