VPN user: hide field by regular user (#688)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Hoang Nguyen 2020-09-11 12:15:52 +02:00 committed by Rohit Yadav
parent a32ba2751f
commit 22eaec4692
1 changed files with 7 additions and 1 deletions

View File

@ -550,7 +550,13 @@ export default {
icon: 'plus',
label: 'label.add.vpn.user',
listView: true,
args: ['username', 'password', 'domainid', 'account']
args: (record, store) => {
if (store.userInfo.roletype === 'User') {
return ['username', 'password']
}
return ['username', 'password', 'domainid', 'account']
}
},
{
api: 'removeVpnUser',