From bc638dbfece4620418ea9f8ed81a3daa16cb16e7 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 7 May 2020 14:19:51 +0530 Subject: [PATCH] compute: fix non-admin start VM args (#328) Signed-off-by: Abhishek Kumar Signed-off-by: Rohit Yadav --- ui/src/config/section/compute.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js index 05dba6ed5cc..b19d3985eca 100644 --- a/ui/src/config/section/compute.js +++ b/ui/src/config/section/compute.js @@ -86,7 +86,7 @@ export default { dataView: true, groupAction: true, show: (record) => { return ['Stopped'].includes(record.state) }, - args: ['podid', 'clusterid', 'hostid'], + args: (record, store) => { return ['Admin'].includes(store.userInfo.roletype) ? ['podid', 'clusterid', 'hostid'] : [] }, response: (result) => { return result.virtualmachine && result.virtualmachine.password ? `Password of the VM is ${result.virtualmachine.password}` : null } }, {