Change UI VM deployment to show SSH keys only if user has keys (#5804)

This commit is contained in:
Gabriel Beims Bräscher 2021-12-27 16:53:36 -03:00 committed by GitHub
parent 8ba5b92a83
commit 19325d0286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -391,6 +391,7 @@
</template>
</a-step>
<a-step
v-if="isUserAllowedToListSshKeys"
:title="this.$t('label.sshkeypairs')"
:status="zoneSelected ? 'process' : 'wait'">
<template slot="description">
@ -1059,6 +1060,9 @@ export default {
showSecurityGroupSection () {
return (this.networks.length > 0 && this.zone.securitygroupsenabled) || (this.zone && this.zone.networktype === 'Basic')
},
isUserAllowedToListSshKeys () {
return Boolean('listSSHKeyPairs' in this.$store.getters.apis)
},
dynamicScalingVmConfigValue () {
return this.options.dynamicScalingVmConfig?.[0]?.value === 'true'
},