polkit.addRule(function(action, subject) { if ((action.id == "org.freedesktop.packagekit.upgrade-system" || action.id == "org.freedesktop.packagekit.trigger-offline-update" || action.id == "org.freedesktop.packagekit.*" || action.id == "org.debian.apt.install-or-remove-packages" || action.id == "org.aptkit.install-or-remove-packages" || action.id == "org.freedesktop.packagekit.package-remove" || action.id == "com.ubuntu.pkexec.synaptic" || action.id == "com.ubuntu.pkexec.gufw" || action.id == "in.teejeetech.pkexec.timeshift-gtk" || action.id == "org.gnome.gparted" || action.id == "org.nemo.root" || action.id == "org.bleachbit" || action.id == "com.linuxmint.mintsources" || action.id == "org.debian.apt.install-file" || action.id == "org.freedesktop.accounts.user-administration" || action.id == "org.cinnamon.settings-users" || action.id == "org.gtk.vfs.file-operations" || action.id == "org.freedesktop.udisks2.modify-system-configuration" || action.id == "org.freedesktop.policykit.exec" || action.id == "org.freedesktop.udisks2.modify-device-system" ) && subject.active == true && subject.local == true && subject.isInGroup("sudo")) { return polkit.Result.YES; } });