Polkit rules from manjaro
This commit is contained in:
32
99-manjaro.rules
Normal file
32
99-manjaro.rules
Normal file
@@ -0,0 +1,32 @@
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && subject.isInGroup("wheel")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.freedesktop.login1.power-off" ||
|
||||
action.id == "org.freedesktop.login1.reboot" ||
|
||||
action.id == "org.freedesktop.login1.hibernate" ||
|
||||
action.id == "org.freedesktop.login1.suspend") {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.freedesktop.upower.hibernate" ||
|
||||
action.id == "org.freedesktop.upower.suspend") {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
|
||||
/* Allow users of network 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("network")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user