Ensuring user is enabled before it being rendered into the vpn.

This commit is contained in:
sergiotarxz 2024-07-20 04:40:59 +02:00
parent f8711ebd02
commit f6b153003b

View File

@ -21,7 +21,7 @@ ListenPort = @{[$config->{vpnclients}{server_port}]}
PrivateKey = @{[$config->{vpn}{privkey}]}
EOF
my $resultset = VPNManager::Schema->Schema->resultset('VPNUser');
my @users = $resultset->search( {} );
my @users = $resultset->search( { -bool => 'is_enabled' } );
for my $user (@users) {
next if !$user->is_enabled;