aboutsummaryrefslogtreecommitdiffstats
path: root/community/modemmanager/modemmanager.rules
blob: 4c56fb7f9ef117068e03d8e6c01d2f51dad066bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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";
    }
});

// Let geoclue modify ModemManager for location gathering
polkit.addRule(function(action, subject) {
    if ((action.id == "org.freedesktop.ModemManager1.Device.Control" ||
	action.id == "org.freedesktop.ModemManager1.Location") &&
        subject.isInGroup("geoclue")) {
        return "yes";
    }
});