fix(项目管理): 模板设置查询权限控制问题

--bug=1027096 --user=宋昌昌 【系统设置】用户组和权限-项目成员-模版设置-只开启了查询权限,用户登录后模版设置模块什么也看不到? https://www.tapd.cn/55049933/s/1386351
This commit is contained in:
song-cc-rock 2023-06-26 16:58:34 +08:00 committed by 刘瑞斌
parent 8d37c2269f
commit 40babf6492
4 changed files with 12 additions and 0 deletions

View File

@ -42,26 +42,35 @@ export default {
methods: {
hasPermissions,
changeTab() {
let editPermission = false;
if (hasPermissions('PROJECT_TEMPLATE:READ+API_TEMPLATE')) {
this.activeName = 'apiTemplate';
this.apiTemplateEnable = true;
editPermission= true;
}
// 1
if (hasPermissions('PROJECT_TEMPLATE:READ+ISSUE_TEMPLATE')) {
this.activeName = 'issueTemplate';
this.issueTemplateEnable = true;
editPermission= true;
}
// 2
if (hasPermissions('PROJECT_TEMPLATE:READ+CASE_TEMPLATE')) {
this.activeName = 'caseTemplate';
this.caseTemplateEnable = true;
editPermission= true;
}
// 3
if (hasPermissions('PROJECT_TEMPLATE:READ+CUSTOM')) {
this.activeName = 'field';
this.fieldEnable = true;
editPermission= true;
}
if (!editPermission) {
this.$error(this.$t('custom_template.no_edit_permission'));
}
}
}

View File

@ -33,6 +33,7 @@ const message = {
timing_clean_ui_report: "Regularly clean up report",
},
custom_template: {
no_edit_permission: "no permissions to edit case/issue/api template, please contact the administrator",
api_template: "Api Template",
base_fields: "Base fields",
template_name: "Template name",

View File

@ -31,6 +31,7 @@ const message = {
timing_clean_ui_report: "定时清理UI测试报告",
},
custom_template: {
no_edit_permission: "您没有配置用例/缺陷/接口模板相关的权限,请联系管理员",
api_template: "接口模版",
base_fields: "基础字段",
template_name: "模版名称",

View File

@ -31,6 +31,7 @@ const message = {
timing_clean_ui_report: "定時清理UI測試報告",
},
custom_template: {
no_edit_permission: "您沒有配置用例/缺陷/接口模板相關的權限,請聯繫管理員",
api_template: "接口模版",
base_fields: "基礎字段",
template_name: "模版名稱",