2024-05-09 22:45:53 +02:00
|
|
|
// Show a root password prompt for these actions:
|
|
|
|
// - change network settings
|
|
|
|
// - hibernate
|
|
|
|
// - change package download proxy
|
|
|
|
// - mount removable storage, perform other disk operations
|
|
|
|
|
|
|
|
polkit.addRule(function (action, subject) {
|
|
|
|
if (
|
|
|
|
action.id.indexOf("org.freedesktop.ModemManager1.") === 0 ||
|
2024-05-13 22:59:31 +02:00
|
|
|
(action.id.indexOf("org.freedesktop.NetworkManager.") === 0 &&
|
|
|
|
action.id !== "org.freedesktop.NetworkManager.wifi.scan") ||
|
2024-05-09 22:45:53 +02:00
|
|
|
action.id === "org.freedesktop.login1.hibernate" ||
|
|
|
|
action.id === "org.freedesktop.packagekit.system-network-proxy-configure" ||
|
|
|
|
action.id.indexOf("org.freedesktop.udisks2.") === 0
|
|
|
|
) {
|
|
|
|
return polkit.Result.AUTH_ADMIN;
|
|
|
|
}
|
|
|
|
});
|