Skip to content

Commit

Permalink
feat:触发事件重放操作权限控制 TencentBlueKing#11052
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 20775
  • Loading branch information
vhwweng committed Oct 15, 2024
1 parent d065486 commit 0cf1f8d
Showing 1 changed file with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,29 @@
size="small"
theme="primary"
@click="triggerEvent(event)"
v-perm="{
hasPermission: canExecute,
disablePermissionApi: true,
permissionData: {
projectId,
resourceType: 'pipeline',
resourceCode: pipelineId,
action: RESOURCE_ACTION.EXECUTE
}
}"
>
{{ $t('reTrigger') }}
</bk-button>
</li>
</ul>
</template>
<script>
import {
RESOURCE_ACTION
} from '@/utils/permission'
import { statusColorMap } from '@/utils/pipelineStatus'
import { convertTime } from '@/utils/util'
import { mapActions } from 'vuex'
import { mapActions, mapState } from 'vuex'
export default {
props: {
events: {
Expand All @@ -53,8 +66,21 @@
}
},
computed: {
...mapState('atom', ['pipelineInfo']),
RESOURCE_ACTION () {
return RESOURCE_ACTION
},
statusColorMap () {
return statusColorMap
},
projectId () {
return this.$route.params.projectId
},
pipelineId () {
return this.$route.params.pipelineId
},
canExecute () {
return this.pipelineInfo?.permissions?.canExecute ?? true
}
},
inject: ['updateList'],
Expand Down

0 comments on commit 0cf1f8d

Please sign in to comment.