From c2956bdd069178fb04a0f862521d1ff402755e03 Mon Sep 17 00:00:00 2001 From: lannoy0523 <935275025@qq.com> Date: Tue, 21 Nov 2023 17:03:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B8=85=E7=90=86,=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=9B=B4=E6=96=B0=E6=9D=83=E9=99=90=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=20#1470?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devops-repository/src/views/repoGeneric/index.vue | 4 ++-- src/frontend/devops-repository/src/views/repoList/index.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/devops-repository/src/views/repoGeneric/index.vue b/src/frontend/devops-repository/src/views/repoGeneric/index.vue index ed3a575582..4dc7da03b5 100644 --- a/src/frontend/devops-repository/src/views/repoGeneric/index.vue +++ b/src/frontend/devops-repository/src/views/repoGeneric/index.vue @@ -57,7 +57,7 @@ @click="handlerMultiDelete()"> {{ $t('batchDeletion') }} - {{ $t('clean') }} @@ -161,7 +161,7 @@ ] : []) ] : []), !row.folder && { clickEvent: () => handlerForbid(row), label: row.metadata.forbidStatus ? $t('liftBan') : $t('forbiddenUse') }, - permission.delete && repoName !== 'pipeline' && { clickEvent: () => deleteRes(row), label: $t('delete') } + permission.delete && ((repoName === 'pipeline' && (userInfo.admin || userInfo.manage)) || repoName !== 'pipeline') && { clickEvent: () => deleteRes(row), label: $t('delete') } ]"> diff --git a/src/frontend/devops-repository/src/views/repoList/index.vue b/src/frontend/devops-repository/src/views/repoList/index.vue index 5725c06231..7a0176ce09 100644 --- a/src/frontend/devops-repository/src/views/repoList/index.vue +++ b/src/frontend/devops-repository/src/views/repoList/index.vue @@ -85,7 +85,7 @@ && row.name !== 'log' && row.name !== 'pipeline' )) && { label: $t('delete'), clickEvent: () => deleteRepo(row) }, - { label: $t('cleanRepo'), clickEvent: () => cleanRepo(row) } + (userInfo.admin || userInfo.manage) && { label: $t('cleanRepo'), clickEvent: () => cleanRepo(row) } ]">