From 51764a5ace22f99bb206d33ddee977cfac858908 Mon Sep 17 00:00:00 2001 From: lannoy0523 <935275025@qq.com> Date: Fri, 8 Nov 2024 11:14:44 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=E4=BF=AE=E6=AD=A3=E6=9D=83?= =?UTF-8?q?=E9=99=90=E5=BC=B9=E7=AA=97=E5=B1=85=E4=B8=AD=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20#2738?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/IamDenyDialog/IamDenyDialog.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/devops-repository/src/components/IamDenyDialog/IamDenyDialog.vue b/src/frontend/devops-repository/src/components/IamDenyDialog/IamDenyDialog.vue index fcc3fb458f..1347ea85f2 100644 --- a/src/frontend/devops-repository/src/components/IamDenyDialog/IamDenyDialog.vue +++ b/src/frontend/devops-repository/src/components/IamDenyDialog/IamDenyDialog.vue @@ -93,6 +93,10 @@ diff --git a/src/frontend/devops-repository/src/views/repoSearch/index.vue b/src/frontend/devops-repository/src/views/repoSearch/index.vue index f7cda98965..50c69aeb76 100644 --- a/src/frontend/devops-repository/src/views/repoSearch/index.vue +++ b/src/frontend/devops-repository/src/views/repoSearch/index.vue @@ -125,7 +125,7 @@ } }, computed: { - ...mapState(['userList']), + ...mapState(['userList', 'userInfo']), projectId () { return this.$route.params.projectId }, @@ -140,7 +140,7 @@ }, methods: { formatDate, - ...mapActions(['searchPackageList', 'searchRepoList']), + ...mapActions(['searchPackageList', 'searchRepoList', 'getPermissionUrl']), refreshRoute () { this.$router.replace({ query: { @@ -194,6 +194,27 @@ this.hasNext = false } scrollLoad ? this.resultList.push(...records) : (this.resultList = records) + }).catch(err => { + if (err.status === 403) { + this.getPermissionUrl({ + body: { + projectId: this.projectId, + action: 'READ', + resourceType: 'PROJECT', + uid: this.userInfo.name + } + }).then(res => { + if (res !== '' && res !== null) { + this.showIamDenyDialog = true + this.showData = { + projectId: this.projectId, + repoName: '', + action: 'READ', + url: res + } + } + }) + } }).finally(() => { this.isLoading = false }) From 45b99eb3b7e817fcdff53c54f0d9f69224fdd317 Mon Sep 17 00:00:00 2001 From: lannoy0523 <935275025@qq.com> Date: Mon, 11 Nov 2024 16:57:00 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=8C=89=E9=92=AE=E9=97=AE=E9=A2=98=20#2738?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/IamDenyDialog/IamDenyDialog.vue | 13 +------------ .../src/views/repoSearch/index.vue | 10 +++++++--- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/frontend/devops-repository/src/components/IamDenyDialog/IamDenyDialog.vue b/src/frontend/devops-repository/src/components/IamDenyDialog/IamDenyDialog.vue index 1347ea85f2..23723e3620 100644 --- a/src/frontend/devops-repository/src/components/IamDenyDialog/IamDenyDialog.vue +++ b/src/frontend/devops-repository/src/components/IamDenyDialog/IamDenyDialog.vue @@ -1,5 +1,5 @@ @@ -86,9 +87,10 @@ import { mapState, mapActions } from 'vuex' import { formatDate } from '@repository/utils' import { repoEnum } from '@repository/store/publicEnum' + import iamDenyDialog from '@repository/components/IamDenyDialog/IamDenyDialog' export default { - name: 'repoSearch', - components: { repoTree, packageCard, InfiniteScroll, typeSelect, genericDetail, genericShareDialog }, + name: 'RepoSearch', + components: { iamDenyDialog, repoTree, packageCard, InfiniteScroll, typeSelect, genericDetail, genericShareDialog }, directives: { focus: { inserted (el) { @@ -121,7 +123,9 @@ hasNext: true, focusContent: this.$t('toggle'), repoNames: [], - init: false + init: false, + showIamDenyDialog: false, + showData: {} } }, computed: { From 7daa3cf10dbb12d3a7dd809ee207937a0b839539 Mon Sep 17 00:00:00 2001 From: lannoy0523 <935275025@qq.com> Date: Mon, 11 Nov 2024 17:20:11 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E6=9D=83?= =?UTF-8?q?=E9=99=90=E5=BC=B9=E7=AA=97=E9=80=BB=E8=BE=91=20#2738?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/GlobalUploadViewport/index.vue | 2 +- .../src/views/repoCommon/commonFormDialog.vue | 2 +- .../src/views/repoCommon/commonPackageDetail.vue | 4 ++-- .../src/views/repoCommon/commonPackageList.vue | 4 ++-- .../devops-repository/src/views/repoConfig/index.vue | 4 ++-- .../src/views/repoGeneric/genericDetail.vue | 2 +- .../src/views/repoGeneric/genericFormDialog.vue | 6 +++--- .../src/views/repoGeneric/genericShareDialog.vue | 2 +- .../src/views/repoGeneric/genericTreeDialog.vue | 2 +- .../src/views/repoGeneric/genericUploadDialog.vue | 4 ++-- src/frontend/devops-repository/src/views/repoList/index.vue | 4 ++-- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/frontend/devops-repository/src/components/GlobalUploadViewport/index.vue b/src/frontend/devops-repository/src/components/GlobalUploadViewport/index.vue index 1eeb8a2b87..957da70f5c 100644 --- a/src/frontend/devops-repository/src/components/GlobalUploadViewport/index.vue +++ b/src/frontend/devops-repository/src/components/GlobalUploadViewport/index.vue @@ -210,7 +210,7 @@ repoName: repoName } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: projectId, diff --git a/src/frontend/devops-repository/src/views/repoCommon/commonFormDialog.vue b/src/frontend/devops-repository/src/views/repoCommon/commonFormDialog.vue index 7d4d9269b9..4e8f73ec7c 100644 --- a/src/frontend/devops-repository/src/views/repoCommon/commonFormDialog.vue +++ b/src/frontend/devops-repository/src/views/repoCommon/commonFormDialog.vue @@ -137,7 +137,7 @@ path: this.formDialog.path } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, diff --git a/src/frontend/devops-repository/src/views/repoCommon/commonPackageDetail.vue b/src/frontend/devops-repository/src/views/repoCommon/commonPackageDetail.vue index a7ee1b86f0..ca6d58fd05 100644 --- a/src/frontend/devops-repository/src/views/repoCommon/commonPackageDetail.vue +++ b/src/frontend/devops-repository/src/views/repoCommon/commonPackageDetail.vue @@ -292,7 +292,7 @@ path: this.currentVersion.contentPath } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, @@ -395,7 +395,7 @@ path: this.currentVersion.contentPath } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, diff --git a/src/frontend/devops-repository/src/views/repoCommon/commonPackageList.vue b/src/frontend/devops-repository/src/views/repoCommon/commonPackageList.vue index f2401a8991..30c9f59e8c 100644 --- a/src/frontend/devops-repository/src/views/repoCommon/commonPackageList.vue +++ b/src/frontend/devops-repository/src/views/repoCommon/commonPackageList.vue @@ -176,7 +176,7 @@ repoName: this.repoName } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, @@ -219,7 +219,7 @@ repoName: this.repoName } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, diff --git a/src/frontend/devops-repository/src/views/repoConfig/index.vue b/src/frontend/devops-repository/src/views/repoConfig/index.vue index 91e32a3f74..5745c395dc 100644 --- a/src/frontend/devops-repository/src/views/repoConfig/index.vue +++ b/src/frontend/devops-repository/src/views/repoConfig/index.vue @@ -271,7 +271,7 @@ repoName: this.repoName } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, @@ -349,7 +349,7 @@ repoName: this.repoName } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, diff --git a/src/frontend/devops-repository/src/views/repoGeneric/genericDetail.vue b/src/frontend/devops-repository/src/views/repoGeneric/genericDetail.vue index 01044f1af5..8fc3a4b044 100644 --- a/src/frontend/devops-repository/src/views/repoGeneric/genericDetail.vue +++ b/src/frontend/devops-repository/src/views/repoGeneric/genericDetail.vue @@ -202,7 +202,7 @@ path: this.detailSlider.path } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, diff --git a/src/frontend/devops-repository/src/views/repoGeneric/genericFormDialog.vue b/src/frontend/devops-repository/src/views/repoGeneric/genericFormDialog.vue index 52588bef3d..1a39d378fd 100644 --- a/src/frontend/devops-repository/src/views/repoGeneric/genericFormDialog.vue +++ b/src/frontend/devops-repository/src/views/repoGeneric/genericFormDialog.vue @@ -160,7 +160,7 @@ repoName: this.repoName } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, @@ -203,7 +203,7 @@ path: this.genericForm.path } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, @@ -248,7 +248,7 @@ path: this.genericForm.path } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, diff --git a/src/frontend/devops-repository/src/views/repoGeneric/genericShareDialog.vue b/src/frontend/devops-repository/src/views/repoGeneric/genericShareDialog.vue index c9ef9ee8a4..8f30264e6d 100644 --- a/src/frontend/devops-repository/src/views/repoGeneric/genericShareDialog.vue +++ b/src/frontend/devops-repository/src/views/repoGeneric/genericShareDialog.vue @@ -170,7 +170,7 @@ repoName: repoName } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: projectId, diff --git a/src/frontend/devops-repository/src/views/repoGeneric/genericTreeDialog.vue b/src/frontend/devops-repository/src/views/repoGeneric/genericTreeDialog.vue index f2bc628285..31501f565a 100644 --- a/src/frontend/devops-repository/src/views/repoGeneric/genericTreeDialog.vue +++ b/src/frontend/devops-repository/src/views/repoGeneric/genericTreeDialog.vue @@ -142,7 +142,7 @@ repoName: this.repoName } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, diff --git a/src/frontend/devops-repository/src/views/repoGeneric/genericUploadDialog.vue b/src/frontend/devops-repository/src/views/repoGeneric/genericUploadDialog.vue index fc1bb333b0..f6c68e4409 100644 --- a/src/frontend/devops-repository/src/views/repoGeneric/genericUploadDialog.vue +++ b/src/frontend/devops-repository/src/views/repoGeneric/genericUploadDialog.vue @@ -119,7 +119,7 @@ repoName: this.repoName } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, @@ -168,7 +168,7 @@ repoName: this.repoName } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, diff --git a/src/frontend/devops-repository/src/views/repoList/index.vue b/src/frontend/devops-repository/src/views/repoList/index.vue index 5c42a95476..657c45dbff 100644 --- a/src/frontend/devops-repository/src/views/repoList/index.vue +++ b/src/frontend/devops-repository/src/views/repoList/index.vue @@ -299,7 +299,7 @@ repoName: name } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId, @@ -355,7 +355,7 @@ uid: this.userInfo.name } }).then(res => { - if (res !== '') { + if (res !== '' && res !== null) { this.showIamDenyDialog = true this.showData = { projectId: this.projectId,