1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 12:15:32 +03:00
aports/community/modemmanager/modemmanager.rules
Martijn Braam a240403216 community/modemmanager: rewrite polkit rules
Rewrite polkit rules to no longer use a regex but use seperate string
comparisons instead. This brings it in line with the
gnome-control-center rules. This fixes crashes in polkitd when this
rule is invoked.
2020-02-10 21:35:08 +01:00

11 lines
432 B
Text

// Let users in plugdev group modify ModemManager
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.ModemManager1.Device.Control" ||
action.id == "org.freedesktop.ModemManager1.Contacts" ||
action.id == "org.freedesktop.ModemManager1.Messaging" ||
action.id == "org.freedesktop.ModemManager1.Location") &&
subject.isInGroup("plugdev") && subject.active) {
return "yes";
}
});