fix(测试跟踪): 测试跟踪部分权限问题
--bug=1026953 --user=陈建星 【测试跟踪】项目成员用户在测试计划-编辑功能用例-关联缺陷/添加缺陷-提示无权限错误信息 https://www.tapd.cn/55049933/s/1381311
This commit is contained in:
parent
c4b4770b84
commit
a487bb7f8d
|
@ -37,7 +37,6 @@ public class OperatingLogController {
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/get/source/{goPage}/{pageSize}")
|
@PostMapping("/get/source/{goPage}/{pageSize}")
|
||||||
@RequiresPermissions(PermissionConstants.SYSTEM_OPERATING_LOG_READ)
|
|
||||||
public Pager<List<OperatingLogDTO>> findBySourceId(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody OperatingLogRequest request) {
|
public Pager<List<OperatingLogDTO>> findBySourceId(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody OperatingLogRequest request) {
|
||||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||||
return PageUtils.setPageInfo(page, operatingLogService.findBySourceId(request));
|
return PageUtils.setPageInfo(page, operatingLogService.findBySourceId(request));
|
||||||
|
|
|
@ -92,7 +92,6 @@ public class FileMetadataController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/get/type/all")
|
@GetMapping(value = "/get/type/all")
|
||||||
@RequiresPermissions("PROJECT_FILE:READ")
|
|
||||||
public List<String> getTypes() {
|
public List<String> getTypes() {
|
||||||
return fileMetadataService.getTypes();
|
return fileMetadataService.getTypes();
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ public class CustomFieldTemplateController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/list/{templateId}")
|
@GetMapping("/list/{templateId}")
|
||||||
@RequiresPermissions(PermissionConstants.PROJECT_TEMPLATE_READ_CUSTOM)
|
|
||||||
public List<CustomFieldDao> getCustomFieldByTemplateId(@PathVariable String templateId) {
|
public List<CustomFieldDao> getCustomFieldByTemplateId(@PathVariable String templateId) {
|
||||||
return customFieldTemplateService.getCustomFieldByTemplateId(templateId);
|
return customFieldTemplateService.getCustomFieldByTemplateId(templateId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<ms-file-metadata-list ref="metadataList" @checkRows="checkRows"/>
|
<ms-file-metadata-list v-if="hasProjectFilePermission" ref="metadataList" @checkRows="checkRows"/>
|
||||||
<ms-file-batch-move ref="module" @setModuleId="setModuleId"/>
|
<ms-file-batch-move ref="module" @setModuleId="setModuleId"/>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
|
@ -164,7 +164,7 @@ import {getCurrentProjectID} from "metersphere-frontend/src/utils/token"
|
||||||
import {issueDemandList} from "@/api/issue";
|
import {issueDemandList} from "@/api/issue";
|
||||||
import {TokenKey} from "metersphere-frontend/src/utils/constants";
|
import {TokenKey} from "metersphere-frontend/src/utils/constants";
|
||||||
import DependenciesList from "@/business/common/DependenciesList";
|
import DependenciesList from "@/business/common/DependenciesList";
|
||||||
import {byteToSize, getCurrentUser, getTypeByFileName} from "@/business/utils/sdk-utils";
|
import {byteToSize, getCurrentUser, getTypeByFileName, hasPermission} from "@/business/utils/sdk-utils";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import MsFileMetadataList from "metersphere-frontend/src/components/environment/commons/variable/QuoteFileList";
|
import MsFileMetadataList from "metersphere-frontend/src/components/environment/commons/variable/QuoteFileList";
|
||||||
import MsFileBatchMove from "metersphere-frontend/src/components/environment/commons/variable/FileBatchMove";
|
import MsFileBatchMove from "metersphere-frontend/src/components/environment/commons/variable/FileBatchMove";
|
||||||
|
@ -213,6 +213,9 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
isTesterPermission() {
|
isTesterPermission() {
|
||||||
return true;
|
return true;
|
||||||
|
},
|
||||||
|
hasProjectFilePermission() {
|
||||||
|
return hasPermission("PROJECT_FILE:READ");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 关联文件 -->
|
<!-- 关联文件 -->
|
||||||
<div class="ref-row opt-row"
|
<div class="ref-row opt-row"
|
||||||
|
v-if="hasProjectFilePermission"
|
||||||
@click="associationFile"
|
@click="associationFile"
|
||||||
style="
|
style="
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -104,7 +105,7 @@
|
||||||
></case-attachment-viewer>
|
></case-attachment-viewer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ms-file-metadata-list ref="metadataList" @checkRows="checkRows" />
|
<ms-file-metadata-list v-if="hasProjectFilePermission" ref="metadataList" @checkRows="checkRows" />
|
||||||
<ms-file-batch-move ref="module" @setModuleId="setModuleId" />
|
<ms-file-batch-move ref="module" @setModuleId="setModuleId" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -115,7 +116,7 @@ import { TokenKey } from "metersphere-frontend/src/utils/constants";
|
||||||
import {
|
import {
|
||||||
byteToSize,
|
byteToSize,
|
||||||
getCurrentUser,
|
getCurrentUser,
|
||||||
getTypeByFileName,
|
getTypeByFileName, hasPermission,
|
||||||
} from "@/business/utils/sdk-utils";
|
} from "@/business/utils/sdk-utils";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { getUUID } from "metersphere-frontend/src/utils";
|
import { getUUID } from "metersphere-frontend/src/utils";
|
||||||
|
@ -172,6 +173,9 @@ export default {
|
||||||
targetId() {
|
targetId() {
|
||||||
return this.belongType === "issue" ? this.issueId : this.caseId;
|
return this.belongType === "issue" ? this.issueId : this.caseId;
|
||||||
},
|
},
|
||||||
|
hasProjectFilePermission() {
|
||||||
|
return hasPermission("PROJECT_FILE:READ");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
caseId() {
|
caseId() {
|
||||||
|
|
|
@ -171,7 +171,6 @@ import MsMarkDownText from "metersphere-frontend/src/components/MsMarkDownText";
|
||||||
import IssueComment from "@/business/issue/IssueComment";
|
import IssueComment from "@/business/issue/IssueComment";
|
||||||
import ReviewCommentItem from "@/business/review/commom/ReviewCommentItem";
|
import ReviewCommentItem from "@/business/review/commom/ReviewCommentItem";
|
||||||
import TestCaseAttachment from "@/business/case/components/TestCaseAttachment";
|
import TestCaseAttachment from "@/business/case/components/TestCaseAttachment";
|
||||||
import MsFileMetadataList from "metersphere-frontend/src/components/environment/commons/variable/QuoteFileList";
|
|
||||||
import MsFileBatchMove from "metersphere-frontend/src/components/environment/commons/variable/FileBatchMove";
|
import MsFileBatchMove from "metersphere-frontend/src/components/environment/commons/variable/FileBatchMove";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -188,7 +187,6 @@ export default {
|
||||||
IssueComment,
|
IssueComment,
|
||||||
ReviewCommentItem,
|
ReviewCommentItem,
|
||||||
TestCaseAttachment,
|
TestCaseAttachment,
|
||||||
MsFileMetadataList,
|
|
||||||
MsFileBatchMove,
|
MsFileBatchMove,
|
||||||
CaseAttachmentComponent,
|
CaseAttachmentComponent,
|
||||||
},
|
},
|
||||||
|
|
|
@ -177,7 +177,7 @@
|
||||||
<issue-comment :issues-id="form.id"
|
<issue-comment :issues-id="form.id"
|
||||||
@getComments="getComments"
|
@getComments="getComments"
|
||||||
ref="issueComment"/>
|
ref="issueComment"/>
|
||||||
<ms-file-metadata-list ref="metadataList" @checkRows="checkRows"/>
|
<ms-file-metadata-list v-if="hasProjectFilePermission" ref="metadataList" @checkRows="checkRows"/>
|
||||||
<ms-file-batch-move ref="module" @setModuleId="setModuleId"/>
|
<ms-file-batch-move ref="module" @setModuleId="setModuleId"/>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
@ -200,7 +200,7 @@ import {
|
||||||
getCurrentWorkspaceId,
|
getCurrentWorkspaceId,
|
||||||
getCurrentUserId
|
getCurrentUserId
|
||||||
} from "metersphere-frontend/src/utils/token"
|
} from "metersphere-frontend/src/utils/token"
|
||||||
import {hasLicense} from "metersphere-frontend/src/utils/permission";
|
import {hasLicense, hasPermission} from "metersphere-frontend/src/utils/permission";
|
||||||
import {
|
import {
|
||||||
enableThirdPartTemplate,
|
enableThirdPartTemplate,
|
||||||
getIssuePartTemplateWithProject,
|
getIssuePartTemplateWithProject,
|
||||||
|
@ -350,6 +350,9 @@ export default {
|
||||||
projectId() {
|
projectId() {
|
||||||
return getCurrentProjectID();
|
return getCurrentProjectID();
|
||||||
},
|
},
|
||||||
|
hasProjectFilePermission() {
|
||||||
|
return hasPermission("PROJECT_FILE:READ");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
tabActiveName() {
|
tabActiveName() {
|
||||||
|
|
Loading…
Reference in New Issue