2024-04-10 15:18:25 +02:00
|
|
|
polkit.addRule(function(action, subject) {
|
|
|
|
|
if ((action.id == "org.freedesktop.locale1.set-locale" ||
|
|
|
|
|
action.id == "org.freedesktop.locale1.set-keyboard" ||
|
|
|
|
|
action.id == "org.freedesktop.ModemManager1.Device.Control" ||
|
|
|
|
|
action.id == "org.freedesktop.hostname1.set-static-hostname" ||
|
|
|
|
|
action.id == "org.freedesktop.hostname1.set-hostname") &&
|
|
|
|
|
subject.local &&
|
|
|
|
|
subject.active &&
|
2025-07-26 13:04:11 +02:00
|
|
|
(subject.isInGroup("sudo") || subject.isInGroup("wheel"))) {
|
2024-04-10 15:18:25 +02:00
|
|
|
return polkit.Result.YES;
|
|
|
|
|
}
|
2025-07-26 13:04:11 +02:00
|
|
|
});
|