Skip to content

Commit 22eaec4

Browse files
Hoang Nguyenrohityadavcloud
authored andcommitted
VPN user: hide field by regular user (#688)
Signed-off-by: Rohit Yadav <[email protected]>
1 parent a32ba27 commit 22eaec4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ui/src/config/section/network.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,13 @@ export default {
550550
icon: 'plus',
551551
label: 'label.add.vpn.user',
552552
listView: true,
553-
args: ['username', 'password', 'domainid', 'account']
553+
args: (record, store) => {
554+
if (store.userInfo.roletype === 'User') {
555+
return ['username', 'password']
556+
}
557+
558+
return ['username', 'password', 'domainid', 'account']
559+
}
554560
},
555561
{
556562
api: 'removeVpnUser',

0 commit comments

Comments
 (0)