diff --git a/src/frontend/devops-repository/src/App.vue b/src/frontend/devops-repository/src/App.vue index 8249216a87..241b45740b 100644 --- a/src/frontend/devops-repository/src/App.vue +++ b/src/frontend/devops-repository/src/App.vue @@ -83,10 +83,16 @@ let projectId = '' if (this.projectList.find(v => v.id === urlProjectId)) { projectId = urlProjectId - } else if (this.projectList.find(v => v.id === localProjectId)) { - projectId = localProjectId } else { - projectId = (this.projectList[0] || {}).id + this.$bkMessage({ + message: this.$t('projectNoPermissionTip', { 0: urlProjectId }), + theme: 'error' + }) + if (this.projectList.find(v => v.id === localProjectId)) { + projectId = localProjectId + } else { + projectId = (this.projectList[0] || {}).id + } } localStorage.setItem('projectId', projectId) diff --git a/src/frontend/locale/repository/en-US.json b/src/frontend/locale/repository/en-US.json index 34d1037222..290860f3d0 100644 --- a/src/frontend/locale/repository/en-US.json +++ b/src/frontend/locale/repository/en-US.json @@ -902,5 +902,6 @@ "conanCreditGuideSubTitle1":"1. Execute the following command on the command line to configure remote artifact repository", "conanCreditGuideSubTitle2":"2、Execute the following command on the command line to configure artifact repository credentials(conan1.x)", "conanRecipePlaceholder":"The format of RECIPE is /VERSION>@/CHANNEL>", - "conanPullGuideSubTitle":"Please execute the following command on the command line to pull(conan1.x):" + "conanPullGuideSubTitle":"Please execute the following command on the command line to pull(conan1.x):", + "projectNoPermissionTip": "Request project {0} has no permission and has been switched" } diff --git a/src/frontend/locale/repository/zh-CN.json b/src/frontend/locale/repository/zh-CN.json index 2332851e55..e24a91ed56 100644 --- a/src/frontend/locale/repository/zh-CN.json +++ b/src/frontend/locale/repository/zh-CN.json @@ -905,5 +905,6 @@ "conanCreditGuideSubTitle1":"1、在命令行执行以下命令配置远程仓库", "conanCreditGuideSubTitle2":"2、在命令行执行以下命令配置制品仓库凭据(conan1.x)", "conanRecipePlaceholder":"RECIPE的格式为/VERSION>@/CHANNEL>", - "conanPullGuideSubTitle":"请在命令行执行以下命令进行拉取(conan1.x):" + "conanPullGuideSubTitle":"请在命令行执行以下命令进行拉取(conan1.x):", + "projectNoPermissionTip": "请求项目{0}无权限,已切换" }