From d2cdcb4902c4e7204fb316db1dde89f989c8ab0d Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 24 Sep 2025 09:32:27 +0530 Subject: [PATCH 1/2] ui: do not show admin only options to users while registering template Fixes #11700 Signed-off-by: Abhishek Kumar --- 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 4cb6aa10df8a..a70ac64bae7e 100644 --- a/ui/src/views/image/RegisterOrUploadTemplate.vue +++ b/ui/src/views/image/RegisterOrUploadTemplate.vue @@ -685,6 +685,9 @@ export default { }) }, fetchCustomHypervisorName () { + if (!this.isAdminRole) { + 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 From 6e7b9f27f47cce6c352efe0aeb0fa96511fb5542 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 24 Sep 2025 10:57:55 +0530 Subject: [PATCH 2/2] fix Signed-off-by: Abhishek Kumar --- ui/src/views/image/RegisterOrUploadTemplate.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/views/image/RegisterOrUploadTemplate.vue b/ui/src/views/image/RegisterOrUploadTemplate.vue index a70ac64bae7e..188f8c45ae9a 100644 --- a/ui/src/views/image/RegisterOrUploadTemplate.vue +++ b/ui/src/views/image/RegisterOrUploadTemplate.vue @@ -685,7 +685,7 @@ export default { }) }, fetchCustomHypervisorName () { - if (!this.isAdminRole) { + if (!('listConfigurations' in store.getters.apis)) { return } const params = {