summaryrefslogtreecommitdiff
path: root/user/modemmanager/01-org.freedesktop.ModemManager.rules
diff options
context:
space:
mode:
Diffstat (limited to 'user/modemmanager/01-org.freedesktop.ModemManager.rules')
-rw-r--r--user/modemmanager/01-org.freedesktop.ModemManager.rules8
1 files changed, 8 insertions, 0 deletions
diff --git a/user/modemmanager/01-org.freedesktop.ModemManager.rules b/user/modemmanager/01-org.freedesktop.ModemManager.rules
new file mode 100644
index 000000000..c57f4c55c
--- /dev/null
+++ b/user/modemmanager/01-org.freedesktop.ModemManager.rules
@@ -0,0 +1,8 @@
+// Let users in either 'plugdev' or 'dialout' control ModemManager
+polkit.addRule(function(action, subject) {
+ if (/^org\.freedesktop\.ModemManager1\.(Device\.Control|Contacts|Messaging|Location)$/.test(action.id) &&
+ (subject.isInGroup("plugdev") || subject.isInGroup("dialout")) && subject.active) {
+ return "yes";
+ }
+});
+