19 lines
684 B
Plaintext
19 lines
684 B
Plaintext
// 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 ||
|
|
(action.id.indexOf("org.freedesktop.NetworkManager.") === 0 &&
|
|
action.id !== "org.freedesktop.NetworkManager.wifi.scan") ||
|
|
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;
|
|
}
|
|
});
|