OpenGoPro icon indicating copy to clipboard operation
OpenGoPro copied to clipboard

only ask for sudo password when required

Open epheo opened this issue 1 year ago • 0 comments

Most desktop Linux distributions do not require sudo privileges to control networking.

nmcli takes its permission from Polkit /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy

I'd like OpenGoPro Python SDK to only ask for sudo privileges when necessary.

One way to implement this would be to:

  • check that the user has sufficient privileges using nmcli general permissions
  • ask for sudo password if not

Attaching a PR.

epheo avatar Feb 15 '24 00:02 epheo