fix(测试用例): 操作权限问题#1003873
This commit is contained in:
parent
2accb03dd0
commit
7fe6ca8dc6
|
@ -331,6 +331,8 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let hasEditPermission = hasPermission('PROJECT_TRACK_CASE:READ+EDIT');
|
||||||
|
this.$set(testCase, 'rowClickHasPermission', hasEditPermission);
|
||||||
this.addTab({name: 'edit', testCaseInfo: testCase});
|
this.addTab({name: 'edit', testCaseInfo: testCase});
|
||||||
},
|
},
|
||||||
handleCaseCreateOrEdit(data, type) {
|
handleCaseCreateOrEdit(data, type) {
|
||||||
|
|
|
@ -282,6 +282,10 @@
|
||||||
return SYSTEM_FIELD_NAME_MAP;
|
return SYSTEM_FIELD_NAME_MAP;
|
||||||
},
|
},
|
||||||
readOnly() {
|
readOnly() {
|
||||||
|
const {rowClickHasPermission} = this.currentTestCaseInfo;
|
||||||
|
if (rowClickHasPermission !== undefined) {
|
||||||
|
return !rowClickHasPermission;
|
||||||
|
}
|
||||||
return !hasPermission('PROJECT_TRACK_CASE:READ+CREATE') &&
|
return !hasPermission('PROJECT_TRACK_CASE:READ+CREATE') &&
|
||||||
!hasPermission('PROJECT_TRACK_CASE:READ+EDIT');
|
!hasPermission('PROJECT_TRACK_CASE:READ+EDIT');
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,7 +310,7 @@ export default {
|
||||||
{
|
{
|
||||||
tip: this.$t('commons.copy'), icon: "el-icon-copy-document", type: "success",
|
tip: this.$t('commons.copy'), icon: "el-icon-copy-document", type: "success",
|
||||||
exec: this.handleCopy,
|
exec: this.handleCopy,
|
||||||
permissions: ['PROJECT_TRACK_CASE:READ+EDIT']
|
permissions: ['PROJECT_TRACK_CASE:READ+COPY']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tip: this.$t('commons.delete'), icon: "el-icon-delete", type: "danger",
|
tip: this.$t('commons.delete'), icon: "el-icon-delete", type: "danger",
|
||||||
|
|
Loading…
Reference in New Issue