From b0c77190066fd74336ea831ccf9e5427e793ba7f Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 24 Sep 2025 21:12:28 +0530 Subject: [PATCH] ui: do not show admin only options to users while registering template (#11702) --- ui/src/views/image/RegisterOrUploadTemplate.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/src/views/image/RegisterOrUploadTemplate.vue b/ui/src/views/image/RegisterOrUploadTemplate.vue index 4cb6aa10df8..188f8c45ae9 100644 --- a/ui/src/views/image/RegisterOrUploadTemplate.vue +++ b/ui/src/views/image/RegisterOrUploadTemplate.vue @@ -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