compute: fix non-admin start VM args (#328)

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Abhishek Kumar 2020-05-07 14:19:51 +05:30 committed by Rohit Yadav
parent 416baf104d
commit bc638dbfec

View File

@ -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 }
},
{