This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.19 by this push:
     new a93f7154a07 fix start VMs through group action (#9652)
a93f7154a07 is described below

commit a93f7154a0750ac2bb2527eb82445dd2bec9d84f
Author: Bernardo De Marco Gonçalves <bernardomg2...@gmail.com>
AuthorDate: Mon Sep 9 09:38:42 2024 -0300

    fix start VMs through group action (#9652)
---
 ui/src/config/section/compute.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js
index 4c5a61e3bdc..2570d8a2651 100644
--- a/ui/src/config/section/compute.js
+++ b/ui/src/config/section/compute.js
@@ -120,7 +120,13 @@ export default {
           groupAction: true,
           popup: true,
           groupMap: (selection, values) => { return selection.map(x => { 
return { id: x, considerlasthost: values.considerlasthost } }) },
-          args: ['considerlasthost'],
+          args: (record, store) => {
+            if (['Admin'].includes(store.userInfo.roletype)) {
+              return ['considerlasthost']
+            }
+
+            return []
+          },
           show: (record) => { return ['Stopped'].includes(record.state) },
           component: shallowRef(defineAsyncComponent(() => 
import('@/views/compute/StartVirtualMachine.vue')))
         },

Reply via email to