From 22eaec469217be8a9a81af6d8bf4b74fda6ff35e Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Fri, 11 Sep 2020 12:15:52 +0200 Subject: [PATCH] VPN user: hide field by regular user (#688) Signed-off-by: Rohit Yadav --- ui/src/config/section/network.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/src/config/section/network.js b/ui/src/config/section/network.js index c1b7e72d274..fe213bdb2d7 100644 --- a/ui/src/config/section/network.js +++ b/ui/src/config/section/network.js @@ -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',