fix(缺陷管理): 评论富文本及同步按钮权限控制问题

--bug=1039918 --user=宋昌昌 【缺陷管理】评论缺陷-粘贴图片到输入框,会变成无权限页面 https://www.tapd.cn/55049933/s/1506320
--bug=1039873 --user=宋昌昌 【缺陷管理】只有缺陷管理的查询权限,缺陷管理页面有同步缺陷按钮,并且按钮一直是加载状态 https://www.tapd.cn/55049933/s/1506459
This commit is contained in:
song-cc-rock 2024-04-23 13:42:36 +08:00 committed by 刘瑞斌
parent a013361ff1
commit 2af3240e2d
3 changed files with 8 additions and 4 deletions

View File

@ -138,10 +138,9 @@ public class BugAttachmentController {
return bugAttachmentService.upgrade(request, SessionUtils.getUserId());
}
// 富文本相关接口
@PostMapping("/upload/md/file")
@Operation(summary = "缺陷管理-富文本附件-上传")
@RequiresPermissions(logical = Logical.OR, value = {PermissionConstants.PROJECT_BUG_ADD, PermissionConstants.PROJECT_BUG_UPDATE})
@RequiresPermissions(logical = Logical.OR, value = {PermissionConstants.PROJECT_BUG_ADD, PermissionConstants.PROJECT_BUG_UPDATE, PermissionConstants.PROJECT_BUG_COMMENT})
public String upload(@RequestParam("file") MultipartFile file) throws Exception {
return bugAttachmentService.uploadMdFile(file);
}

View File

@ -47,7 +47,7 @@ export const deleteFileOrCancelAssociationUrl = '/bug/attachment/delete';
// 获取附件列表
export const getAttachmentListUrl = '/bug/attachment/list/';
// 富文本编辑器上传图片
export const editorUploadFileUrl = '/attachment/upload/temp/file';
export const editorUploadFileUrl = '/bug/attachment/upload/md/file';
// 获取回收站列表
export const getRecycleListUrl = '/bug/trash/page';

View File

@ -15,7 +15,12 @@
<a-button v-permission="['PROJECT_BUG:READ+ADD']" type="primary" @click="handleCreate"
>{{ t('bugManagement.createBug') }}
</a-button>
<a-button v-if="currentPlatform !== 'Local'" :loading="!isComplete" type="outline" @click="handleSync"
<a-button
v-if="currentPlatform !== 'Local'"
v-permission="['PROJECT_BUG:READ+ADD']"
:loading="!isComplete"
type="outline"
@click="handleSync"
>{{ t('bugManagement.syncBug') }}
</a-button>
</div>