summaryrefslogtreecommitdiff
path: root/source/xap/blueman/30-blueman-netdev-allow-access.rules
diff options
context:
space:
mode:
Diffstat (limited to 'source/xap/blueman/30-blueman-netdev-allow-access.rules')
-rw-r--r--source/xap/blueman/30-blueman-netdev-allow-access.rules10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/xap/blueman/30-blueman-netdev-allow-access.rules b/source/xap/blueman/30-blueman-netdev-allow-access.rules
new file mode 100644
index 00000000..9ef313c7
--- /dev/null
+++ b/source/xap/blueman/30-blueman-netdev-allow-access.rules
@@ -0,0 +1,10 @@
+/* Allow users in netdev 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("netdev")) {
+ return polkit.Result.YES;
+ }
+});