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