]> code.delx.au - monosys/commitdiff
blueman polkit fix
authorJames Bunton <jamesbunton@delx.net.au>
Sun, 7 Oct 2018 22:29:51 +0000 (09:29 +1100)
committerJames Bunton <jbunton@atlassian.com>
Sun, 7 Oct 2018 23:45:53 +0000 (10:45 +1100)
etc/polkit-1/rules.d/99-blueman.rules [new file with mode: 0644]

diff --git a/etc/polkit-1/rules.d/99-blueman.rules b/etc/polkit-1/rules.d/99-blueman.rules
new file mode 100644 (file)
index 0000000..79c7b6e
--- /dev/null
@@ -0,0 +1,10 @@
+/* Allow users in sudo group to use blueman feature requiring root without authentication */
+polkit.addRule(function(action, subject) {
+    if ((action.id == "org.blueman.network.setup" ||
+         action.id == "org.blueman.dhcp.client" ||
+         action.id == "org.blueman.rfkill.setstate" ||
+         action.id == "org.blueman.pppd.pppconnect") &&
+        subject.isInGroup("sudo")) {
+        return polkit.Result.YES;
+    }
+});