// 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";
    }
});