ui: do not show admin only options to users while registering template (#11702)

This commit is contained in:
Abhishek Kumar 2025-09-24 21:12:28 +05:30 committed by GitHub
parent e78b5cc3cc
commit b0c7719006
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -685,6 +685,9 @@ export default {
})
},
fetchCustomHypervisorName () {
if (!('listConfigurations' in store.getters.apis)) {
return
}
const params = {
name: 'hypervisor.custom.display.name'
}
@ -702,6 +705,9 @@ export default {
})
},
fetchExtensionsList () {
if (!this.isAdminRole) {
return
}
this.loading = true
getAPI('listExtensions', {
}).then(response => {
@ -758,6 +764,9 @@ export default {
name: 'Simulator'
})
}
if (!this.isAdminRole) {
listhyperVisors = listhyperVisors.filter(hv => hv.name !== 'External')
}
this.hyperVisor.opts = listhyperVisors
}).finally(() => {
this.hyperVisor.loading = false