Skip to content

Commit

Permalink
feat:清理,删除按钮更新权限控制 #1470 (#1471)
Browse files Browse the repository at this point in the history
  • Loading branch information
lannoy0523 authored Nov 21, 2023
1 parent c7dba3e commit efe72d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
@click="handlerMultiDelete()">
{{ $t('batchDeletion') }}
</bk-button>
<bk-button class="ml10" v-if="multiSelect.length && multiSelect.some(key => (
<bk-button class="ml10" v-if="(userInfo.admin || userInfo.manage) && multiSelect.length && multiSelect.some(key => (
key.folder === true
))" @click="clean">
{{ $t('clean') }}
Expand Down Expand Up @@ -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') }
]">
</operation-list>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
]">
</operation-list>
</template>
Expand Down

0 comments on commit efe72d7

Please sign in to comment.