Polkit pkla rule is not working on 18.04

I had a problem not being able to connect to vpn from ssh session on ubuntu 18.04. The problem was related to polkit, since

nmcli general permissions

Shows the lack of permissiosns.

I've succeed with following way of adding custom polkit rule with ubuntu 18.04 (still polkit version 0.105, no support of javascript rules). As root I executed the command:

 # cat > /etc/polkit-1/localauthority/50-local.d/allow-all-for-group-sudo-polkit105.pkla

and entered following contents (note, this allows EVERYTHING for users of sudo group, may be risky):

[Allow all without authentication for members of sudo group even for ssh sessions]
Identity=unix-group:sudo
Action=*
ResultAny=yes

After this without restarting of any services or rebooting I got permissions to use any nmcli commands from ssh.